Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int doseries(int inp);
- int main()
- {
- int input,i,j,n;
- scanf("%d",&input);
- n=doseries(input);
- printf("\n");
- for(i=input;i>0;i--)
- {
- for(j=i;j>0;j--)
- {
- if(n<10){printf("0%d ",n--);}
- else printf("%d ",n--);
- }
- printf("\n");
- }
- return 0;
- }
- doseries(int inp)
- {
- int i;
- for(i=inp-1;i>0;i--)
- {
- inp=inp+i;
- }
- return inp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement