Advertisement
Josif_tepe

Untitled

Feb 18th, 2025
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <queue>
  3. #include <cmath>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. void rec(int x) {
  8.     if(x == 0) {
  9.         return;
  10.     }
  11.     int cifra = x % 10;
  12.     cout << cifra << " ";
  13.     rec(x / 10);
  14. }
  15. int main()
  16. {
  17.    
  18.     rec(1234);
  19.  
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement