Untitled
Anonymous
plain_text
11/14/2023 10:17 AM
304 B
20
Indexable
#include <iostream>
using namespace std;
int countsOfdigits(int a) {
int count = 0;
while (a) {
a /= 10;
count++;
}
cout << count;
return count;
}
int main()
{
int n;
cin >> n;
countsOfdigits(n);
}Editor is loading...
Leave a Comment