Problem in question

what is the condition ,how the program should take exit ??
i know, i am wrong please take a look at my program submitted
and tell me if there is any more error as all test cases are failed