بالنسبه لهذا الكود
#include <iostream>
using namespace std;
int GetNumberOfDigits(int n) {
int c=0;
while(n){
c++;
n=n/10;
}
return c;
}
//------------------
int main()
{
int x ;
cin >> x;
cout <<"x= "<<GetNumberOfDigits(x);
return 0;
}هذا الشرط ما فهمته
while(n)
http://groups.google.com.sa/group/Cplusplusimamgroup
تفضلوا بالزيارة لقروبي :)