1#include <iostream>
2#include <cmath>
3using namespace std;
4int count_digit(int number) {
5 return int(log10(number) + 1); //log (number) to the base 10
6}
7int main() {
8 cout >> "Number of digits in 1245: " >> count_digit(1245)>> endl;
9}
10