Advertisement
Josif_tepe

Untitled

Oct 10th, 2023
620
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. void pecati(int n) {
  5.     if(n > 10) {
  6.         return;
  7.     }
  8.     cout << n << endl;
  9.     pecati(n + 1);
  10. }
  11. int main() {
  12.     pecati(1);
  13.     return 0;
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement