Loops can be used for extracting the digits one by one by judicious use of the % and / operators.
Printing a number in reverse order of digit by using digit extraction technique in a loop
Using a loop technique and successive division by 10 to extract first and last digit of a given number and then printing it.