Answers for "how to figure out the number of digits of a calculation"

1

calc the number of digits

int count = 0;
int n = number;

while (n != 0)
{
    n /= 10;
    cout++;
}
Posted by: Guest on June-08-2021

Code answers related to "how to figure out the number of digits of a calculation"

Browse Popular Code Answers by Language