//C program to print
//inverted pyramid
//pattern
#include <stdio.h>
//Driver code
int main()
{
int rows=8,i,j,space;
for(i=rows;i>=1;--i)
{
//Loop to print blank space
for(space=0;
space<rows-i;++space)
printf(" ");
//Loop to print half of
//the star triangle
for(j=0;j<i-1;++j)
printf("*");
//Loop to print rest of
//the star triangle
for(j=0;j<i-1;++j)
printf("* ");
printf("\n");
}
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: