Josif_tepe

Untitled

Feb 26th, 2026
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int x = 1234;
  6.    
  7.     for(int i = x; i > 0; i /= 10) {
  8.         int cifra = i % 10;
  9.         cout << cifra << " ";
  10.     }
  11.     return 0;
  12. }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment