My coding isnt accepting

i wrote code on my own but on submission its not passing for 2nd test case. but on manually compiling with data of 2nd test case its giving same answer.
plz tell weather my code is correct or not.
here is the link https://ide.codingblocks.com/s/375325

Hey @pratik.win
Mentioned the changes in comments : https://ide.codingblocks.com/s/375726 :slight_smile: