Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
267 B
1
Indexable
Never
#include <iostream>
#include <string>
using namespace std;

int kol(int x) {
	int sum = 0;
	while (x > 0) {
		x = x / 10;
		sum++;

	}
	return sum;

}
int main()
{
	setlocale(LC_ALL, "Russian");
	int x = 0;
	cin >> x;
	
	cout << kol(x);
	
	
}
Leave a Comment