get digits of a number code example
Example 1: find number of digits in a number
floor(log10(n) + 1);
Example 2: how to store a 6 digit number as 6 separate integers
int number; // = some int
while (number > 0) {
print( number % 10);
number = number / 10;
}