Anyone please find the error in this code it is not able to pass all the test cases

@sohail_akhtar
i Think u r missing for the case n==0;