In the above code, one of the test cases continues to fail. I have considered the case where the first digit is 9 and other cases. I am not able to understand the error in my logic.
Not able to figure out why test case is failing
check your code for n=99, the problem in your code is condition for first digit which is n/10<10, whereas it should be n/10==0.
Thanks
Ok, I Got it. Thanks!
please resolve it if satisfied. thanks
I have marked the doubt as resolved and closed it.