fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n;cin>>n;
  6. int c=0;
  7. while(n>0)
  8. {
  9.  
  10. n/=10;
  11. c++;
  12. }
  13. cout<<c;
  14. }
Success #stdin #stdout 0.01s 5320KB
stdin
12344
stdout
5