+ 4

can any one tell me whats wrong in my code?

it gives always zero as output. https://code.sololearn.com/cCVqWIowQYX3/?ref=app

27th Nov 2018, 9:59 AM
AKSHAY
AKSHAY - avatar
2 Respuestas
+ 4
In your loop you are /=ing your n, so later it is gone. You should make a copy of n and extract the digits from that in order to have the original n for later.
27th Nov 2018, 10:08 AM
HonFu
HonFu - avatar
+ 2
thank u HonFu. it solved now. 😊
27th Nov 2018, 10:24 AM
AKSHAY
AKSHAY - avatar