Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void pecati(int n) {
- if(n > 5) {
- return;
- }
- pecati(n + 1);
- cout << n << endl;
- }
- int main() {
- pecati(1);
- return 0;
- }
- // pecati(1) | 9
- // pecati(2) | 9
- // pecati(3) | 9
- // pecati(4) | 9
- // pecati(5) | 9
- // pecati(6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement