Untitled

mail@pastecode.io avatar
unknown
c_cpp
6 months ago
237 B
0
Indexable
Never
#include <iostream>

int count(long long number) {
	int sum = 0;
	do {
		sum += 1;
		number /= 10;
	} while (number != 0);
	return sum;
}
int main() {
	long long number;

	std::cin >> number;
	std::cout << count(number);
}
Leave a Comment