Advertisement
Josif_tepe

Untitled

Nov 16th, 2021
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. void rec(int i) {
  5.     if(i == 11) {
  6.         return;
  7.     }
  8.     cout << i << " ";
  9.     rec(i + 1);
  10. }
  11. int main()
  12. {
  13.     rec(1);
  14.    
  15.         return 0;
  16. }
  17. /*
  18.  rec(1)
  19.  rec(2)
  20.  rec(3)
  21.  rec(4)
  22.  rec(5)
  23.  rec(6)
  24.  rec(7)
  25.  rec(8)
  26.  rec(9)
  27.  rec(10)
  28.  rec(11)
  29.  
  30.  **/
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement