how to do lenght of numbers in c++ 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);