Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <queue>
- #include <algorithm>
- #include <vector>
- #include <algorithm>
- #include <set>
- #include <cstring>
- #include <cmath>
- #include <map>
- #include <fstream>
- using namespace std;
- void f(int x) {
- if(x > 10) {
- return;
- }
- cout << x << " ";
- f(x + 1);
- }
- int main() {
- f(1);
- return 0;
- }
- /*
- f(1) --> f(2)
- f(2) --> f(3)
- f(3) --> f(4)
- f(4) --> f(5)
- f(5) --> f(6)
- f(6) --> f(7)
- f(7) --> f(8)
- f(8) --> f(9)
- f(9) --> f(10)
- f(10) --> f(11)
- f(11) return
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement