Advertisement
Josif_tepe

Untitled

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