implement the C program to print star
COMPUTER GAYN
Q. IMPLEMENT THE C PROGRAM TO PRINT STARS?
ANS:- #include<stdio.h>
int main()
{
int i,j,n,rows;
printf("enter the no of rows");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
return 0;
}
0 Comments