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