Hi Hannah
If you want to find the least significant digit in value X in base N then just divide X by N and take the remainder. So if you have decimal value 1234 and want to extract the least signifcant digit, you just calculate 1234 % 10 = 4. Then you want to 'remove' the 4 so you can get the next digit, and to do that you just divide by 10 ie. 1234 / 10 = 123 (using integer division).
And repeat, until you run out of digits ie. X is 0.
Alternatively, just convert your number into a
string and extract the digits from that. Use sprintf(buf, "%d", X) to get the decimal representation of X in buf, "1234", so buf[0] = '1', buf[1] = '2' etc. Then convert the character values to numbers by subtracting '0' ie. '2' - '0' = 2.
(To be safe
you should use snprintf() - look it up.)
Cheers
John
Edit: sorry Stephan, didn't see your post until after posting mine.