/**********************************************************
* C Program to print full inverted hollow pyramid using *
**********************************************************/
#include<stdio.h> // include stdio.h
int main() {
int n;
printf("Enter number of lines: \n");
scanf("%d", &n);
printf("\n");
// loop for line number of lines
for (int i = n; i >= 1; i--) {
// loop to print leading spaces in each line
for (int space = n - i; space >= 1; space--) {
printf(" ");
}
// loop to print *
for (int j = i * 2 - 1; j >= 1; j--)
{
if (j == 1 || (j == i * 2 - 1) || i == n)
{
printf(" * ");
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}