Advertisement
Josif_tepe

Untitled

Nov 11th, 2024
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <queue>
  4. using namespace std;
  5.  
  6. void recursion(int x) {
  7.     cout << x << " ";
  8.     if(x < 10) {
  9.         recursion(x + 1);
  10.     }
  11. }
  12. int main() {
  13.     recursion(1);
  14.     return 0;
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement