fork download
  1. #include<iostream>
  2. using namespace std;
  3. int n, nrcifre;
  4. int main() {
  5. cin >> n;
  6. nrcifre = 0;
  7. while(n>0){
  8. nrcifre = nrcifre + 1;
  9. n = n / 10;}
  10. cout << nrcifre;
  11. return 0;}
Success #stdin #stdout 0.01s 5292KB
stdin
2354647423642894724859
stdout
10