how to get the length of a number in cpp code example
Example: c++ length of int
unsigned int number_of_digits = 0;
do {
++number_of_digits;
n /= base;
} while (n);
unsigned int number_of_digits = 0;
do {
++number_of_digits;
n /= base;
} while (n);