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