blob: bc35cde9769f181310571656d46918afd1d8dc8e [file] [log] [blame]
int num_digits(int val)
{
int digits = 0;
while (val) {
val /= 10;
digits++;
}
return digits;
}