Untitled

mail@pastecode.io avatar
unknown
plain_text
10 months ago
208 B
7
Indexable
#include <iostream>
using namespace std;
int b(int a) {
    int i = 1;
    while ((a /= 10) > 0) {
        i++;   
    }
    return i;
}
int main()
{
    int a;
    cin >> a;
    cout << b(a);
}
Leave a Comment