Solution to my code


Can you tell me what’s the problem with code,t’s showing the same output as sample output but not submitting.

hello @Suruchi
check now->

still coming wrong answer,no changes have been made in code

open this link again->

have mentioned the chnages in comments

ohkk ,it’s working now
Can u tell me what was the problem in if cond?

removed even==0 condition

but before adding this condition , when i first submitted it ,then also it was giving wrong ans,I think because of that No part.
Ohkk,Thanku so much

yes . … … …it was due to that part

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.