Error in code while running

plz edit the eroor as it showing same output on on different step value. an input is getting also increase1d by 1

@uks.2610
I have made some minor changes. Now it is working. Link : https://ide.codingblocks.com/s/205952

Hope it Helps.