I cant figure out why my code is not working

Sir/Ma’am,The test case given in problem passed but none of the test case is passed I am not able to get why is so happening.Link to the code https://ide.codingblocks.com/s/190320

@Devforlife07 your basic test case is not passing either .
you are getting 0 1 2 3 4 5 6 7 9 8 10 11
it should be 0 1 2 3 4 5 6 7 8 9 10 11
try and dry run the code to find the reason for change of 8 9

I got it Thank You Ma’am.

Ma,am I am getting run error in second test case only rest all test cases passed. I have used long type.

hi @Devforlife07
can you send me the link of the updated code.