Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <queue>
- #include <iostream>
- #include <vector>
- #include <cstring>
- #include <iostream>
- #include <set>
- #include <map>
- #include <cstring>
- //#include <bits/stdc++.h>
- using namespace std;
- void broevi(int x) {
- if(x > 5){
- return;
- }
- broevi(x + 1);
- cout << x << " ";
- }
- int main() {
- broevi(1);
- return 0;
- }
- // broevi(1) --> broevi(2) | cout << 1 << " ";
- // broevi(2) --> broevi(3) | cout << 2 << " ";
- // broevi(3) --> broevi(4) | cout << 3 << " ";
- // broevi(4) --> broevi(5) | cout << 4 << " " ;
- // broevi(5) --> broevi(6) | cout << 5 << " ";
- // broevi(6)
Advertisement
Add Comment
Please, Sign In to add comment