1.Find the no of digits in given no using % n /
2.Then find the last digit , multiply it by 10 power n , n-no of digits in given no
3.n:n-1 n find the digit previous to last , multiply by 10 pow n-1,den add it wit previous sum
4.Perform 2 n 3 until n:0
Leave a comment: