Print half pyramid pattern in c language.
#include<stdio.h>
#include<conio.h>
void main()
{
int i ,j,row;
clrscr();
printf("enter the size of row=");
scanf("%d",&row);
for(i=1; i<=row; i++)
{
for(j=1; j<=i; j++)
{
printf("*");
}
printf("\n");
}
getch();
}
■》Output->
enter the size of row=5
*
**
***
****
*****
Comments
Post a Comment