PATTERN IN C


#include<conio.h>
#include<stdio.h>
main()
{
int count =0;
for(int i=5; i>=1; i-- )
{
for(int j=(i-1); j>=1; j-- )
{
printf("#");
}
for(int k=0; k<=count; k++ )
{
printf("*");
}count=count+2;
printf("\n");
}
}

OUTPUT


####*
###***
##*****
#*******
*********

No comments:

Post a Comment