C Program to print star pattern pyramid form

In this article,I will show how to write C program to print Star Pattern pyramid form.

Example: Print Star pattern in C

#include
#include
void main()
{
int s=5,a,b,c,n=0;
clrscr();
for(a=1; a<=s; a++)
{
if(a%2!=0)
        {
 n=(s-a)/2;
  for(c=0; c
{
printf<<(" ");
}
for(b=0; b
{
printf<<(" * ");
}
 printf<<("\n");
}
 
}
getch();
}

OUTPUT:

      *
    * * *
  * * * * *