Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
394 B
1
Indexable
Never
//задача номер 1 (функции)
#include <iostream>
using namespace std;

long long a;
int b = 0;

int numbers(long long a, int b)
{
    if (a == 0)
    {
        cout << "1";
        return 0;
    }
    while (a != 0)
    {
        a /= 10;
        b++;
    }
    cout << b;
    return b;
}

int main()
{
    cin >> a;
    numbers(a,b);
    return 0;
}
Leave a Comment