Lucian_Adrian

#66 NumarulDeCifre

Oct 19th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. int n;
  6. cin >> n;
  7.  
  8. int c = 1;
  9. while(n > 9)
  10. {
  11. c ++;
  12. n /= 10;
  13. }
  14. cout << c << endl;
  15.  
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment