Untitled
unknown
plain_text
3 years ago
233 B
8
Indexable
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int count(int a) {
int c = 0;
while (a > 0)
{
a /= 10;
c += 1;
}
return c;
}
int main()
{
int g;
cin >> g;
cout << count(g);
}Editor is loading...