You are on page 1of 1

#include <iostream>

using namespace std;


int nrc(int x)
{
int c=0;
if(x==0)
c=1;
while(x>0)
{
c++;
x/=10;
}
return c;
}
int main()
{
int x;
cin>>x;
cout<<nrc(x);

return 0;
}

You might also like