Advertisement
Josif_tepe

Untitled

Feb 18th, 2025
90
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.     rec(x / 10);
  13.     cout << cifra << " ";
  14.  
  15. }
  16. int main()
  17. {
  18.    
  19.     rec(1234);
  20.  
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement