runtime error

atm
c
runtime-error

#1

program compiled and ran successfully on my laptop,codechef shows runtime error.
why??


#2

@mandalamk :
According to me it means that your program may not be running as required.
It can occur due to:
main not returning a 0
or, memory being exceeded.
or it can be due to a infinite loop etc.

it ran properly in your compiler due to the given test cases but may fail the corner test cases…
Please do check all the corner test cases carefully


#3

hey @mandalamk,this is your solution link i guess link.Remove void and write int in place of it…and just before last braces of your program add return zero statement and another thing is that remove “insufficient balance
balance is = %f"
” statement…you need not to write anything other than asked

happy coding and let me know if anything goes wrong


#4

@emin3m it isn’t working still.i have uploaded the solution with the corrections you suggested.


#5

would you please explain me the corner test cases you are talking about?