Write a program which takes an integer from the user and calculates the number of digits. code example
Example: c how many digits has a number
digits = (number == 0) ? 1 : (log10(number) + 1);
//or
while (number > 0)
{
number /= 10;
digits++;
}
//see: https://ideone.com/P1h8Ne