Untitled
Anonymous
plain_text
02/26/2023 1:19 PM
312 B
16
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...