The program runs successfully for sample input case. But shows Run time error with all the test cases.