numberOfDigits function

int numberOfDigits(
  1. int number
)

Implementation

int numberOfDigits(int number) {
  int count = 0;
  while (number != 0) {
    count++;
    number ~/= 10;
  }
  return count;
}