Untitled
unknown
c_cpp
2 years ago
267 B
4
Indexable
#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);
}
Editor is loading...
Leave a Comment