Keep taking out quotient till it becomes 0
sum=sum+digit*10
The above approach mentioned in 2 helps in finding the reverse of a number (like 123→ 321)
We use it to find whether a number is palindrome or not (palindrome means the reverse of a number is same as the number itself). Like 232 is a palindrome number but 123 is not.

Factorial of a number n = 123*4…….*n
Intialise a variable fact =1;
Iterate the loop n times and mutiply fact with the iteration variable