//A NICE IMPLEMENTATION TO PRINT A PYRAMID USING STARS//
#include<stdio.h>
int main()
{
int bl,st,n,i,temp;
printf("ENTER THE NO.OF ROWS IN PYRAMID U WANT TO PRINT:\n");//ENTER THE NUMBER OF ROWS OR SIZE OF PYRAMID U WANT TO PRINT
scanf("%d",&n);//9
temp=n;//9
for(i=1;i<=n;i++)//9//n REMAINS ALWAYS CONSTANT EQUAL TO NUMBER OF LINES BEING PRINTED INTO ROW..//
{
for(bl=0;bl<temp;bl++)//9...//TEMP IS DECRESING EVERYTIME ..BCZ..TEMP IS MEASURING BLANCK SPACES IN PYRAMID,,,WHICH IS DECREASING EVERYTIME IN A ROW,,,..//IF 9 ROWS ARE TO BE PRINTED 8 SPACES SHOULD BE LEAVED 1ST Time..//
//7 in 2nd row//6 in 3rd row//5 in 4th row//4 in 5th row// 3 in 6th row// 2 in 7th row//1 in 8th row//no space before 9th row//
printf(" ");
temp--;
for(st=0;st<(2*i-1);st++)//to print star everytime..there should be odd number of stars.....for every value of i ...2*i-1=2*1-1=1 2*2-1=3 2*3-1=5 2*4-1=7 2*5-1=9 2*6-1=11 2*7-1=3 2*8-1=15 2*9-1=17 starts are print after leaving above space..//