For example, if I have the number 142, how do I know it contains the digit 1, 4, and 2?
So far, I've worked out that
142/100 = 1
142 - (1*100) = 42
42/10 = 4
42 - (4*10) = 2
So i can just use a looping system. But is there a simpler solution to find the digits than the method shown above?