This code is unable to pass the test case. It is showing runtime error

Can you please tell me why this showing a runtime error?
I have uploaded my code here

Hello @atreyyash i have corrected your code:


this is now passing all the test cases:
Happy Learning!!

thanks a lot. Please can you correct this code also : https://ide.codingblocks.com/s/429613

@atreyyash you have to raise the separate doubt for any other question.