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