Advertisement
Josif_tepe

Untitled

Jan 27th, 2024
996
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. {
  6.     int x = 1546;
  7.     while(x > 0) {
  8.         int cifra = x % 10;
  9.         cout << cifra << " ";
  10.         x /= 10;
  11.     }
  12.    
  13.     return 0;
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement