Hey! i got it

there was only one silly mitake

i am soo foolish


the mistake was
this


Wrong : num=num%10;
Correct : num=num/10;