Advertisement
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==0)return;
- seris(s-1, e);
- printf("%d ", s);
- }
- int main()
- {
- int n, t;
- cin>>n;
- t = n;
- while (t--)
- {
- if(t==n-1)
- {
- seris(n,1);
- printf("\n");
- }
- else {
- n-=1;
- seris(n,1);
- printf("\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement