Advertisement
Josif_tepe

Untitled

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