Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void main()
- {
- int i,j,spacebar,rows,k,t=1;
- printf("Input number of rows : ");
- scanf("%d",&rows);
- spacebar=rows+4-1;
- for(i=1;i<=rows;i++)
- {
- for(k=spacebar;k>=1;k--)
- {
- printf(" ");
- }
- for(j=1;j<=i;j++)
- printf("%d ",t++);
- printf("\n");
- spacebar--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement