Advertisement
Josif_tepe

Untitled

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