/* WAP TO PRINT THE FOLLOWING FORMAT :-
** *
* * *
* * * *
* * * * *
*
*
*
*
*
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
int row,space;
clrscr();
printf("Enter the total no. of rows you want= ");
scanf("%d",&row);
clrscr();
space=row/2-1;
for(i=0;i<row/2;i++)
{
for(j=0;j<space;j++)
printf(" ");
if(i==0 || i==row/2-1)
{
for(j=0;j<=i;j++)
printf("* ");
}
else
{
for(j=0;j<2;j++)
{
printf("*");
for(k=0;k<4*i-1;k++)
printf(" ");
}
}
printf("\n");
space=space-1;
}
for(i=row/2;i<row;i++)
{
space=row/2-1;
for(j=0;j<space;j++)
{
printf(" ");
}
printf("*\n");
}
getch();
}