how do you know how many digits does a number takes code example Example: find number of digits in a number floor(log10(n) + 1);