/*************************************************
* C Program to print full 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 = 1; i <= n; i++)
{
// loop to print leading spaces in each line
for(int space = 0; space <= n - i; space++)
{
printf(" ");
}
// loop to print *
for(int j = 1; j <= i * 2 - 1; j++)
{
if (j == 1 || (j == i * 2 - 1) || i == n )
{
printf(" * ");
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}