PROGRAM TO PRINT STAR SEQUENCE2

/*PROGRAM TO PRINT STAR SEQUENCE2*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
clrscr();
printf(“Press any key to display the sequence of stars: \n”);
getch();
for(i=1;i<=4;i++)
{
for(j=4-i;j>0;j–)
printf(” “);
for(k=1;k<=i;k++)
printf(“*”);
printf(“\n”);
}
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *