Untitled

Anonymous
c_cpp
10/12/2023 5:47 PM
296 B
17
Indexable
#include <iostream>
using namespace std;

int main()
{
	int a;
	int count = 0;
	cin >> a;

	if (a != 0) {
		while (a != 0) {
			a /= 10;
			count++;
		}
	cout << count;
	}
	
	else
	{
		cout << 1;
	}
}
Editor is loading...