For example if am entering 20 for 5 times then i should get sum as 100 but i am getting it 99. Its happening for all the time i am getting sum as sum-1.
here is the code: