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