#include <iostream>
using namespace std;
int s (long n)
{
int nr=0;
while (n)
{
nr=nr+1;
n=n/10;
}
return nr;
}
int main ()
{
long n;
cout<<"n=";cin>>n;
cout<<"numarul citit are"<<s(n)<<"cifre"<<endl;
return 0;
}
Niciun comentariu:
Trimiteți un comentariu