Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- void seris(int s, int e)
- {
- if(s>e)return;
- printf("%d ", s);
- seris(s+1, e);
- printf("\n");
- seris(1, e-1);
- }
- int main()
- {
- #ifndef Brain_FUCK
- freopen("input.txt","r",stdin);
- freopen("out.txt","w",stdout);
- #endif
- int n;
- cin>>n;
- seris(1,n);
- return 0;
- }
Add Comment
Please, Sign In to add comment