/* Program to print the following output
#include <stdio.h>
int main()
{
int i, j;
for(i=1; i<=5; i++)
{
//Prints trailing spaces before star gets printed
for(j=1; j<i; j++)
{
printf(" ");
}
//Prints hollow inverted right triangle
for(j=i; j<=5; j++)
{
if(j==i || j==5 || i==1)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}
*****
* *
* *
**
*
*/
#include <stdio.h>
int main()
{
int i, j;
for(i=1; i<=5; i++)
{
//Prints trailing spaces before star gets printed
for(j=1; j<i; j++)
{
printf(" ");
}
//Prints hollow inverted right triangle
for(j=i; j<=5; j++)
{
if(j==i || j==5 || i==1)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}