/*******************************************************************
* C Program to print inverted hollow right angled triangle using *
********************************************************************/
#include<stdio.h> // include stdio.h
int main()
{
int n;
printf("Enter number of lines: \n");
scanf("%d", &n);
printf("\n");
// loop for number of lines
for(int i = n; i >= 1; i--)
{
for(int j = i; j >= 1; j--)
{
// print * only on the first line, last line and last column of every line and on the
if(j == 1 || j == i || i == n)
{
printf("* ");
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}