#include<stdio.h>
void main()
{
int len;
printf("input the length:");
scanf("%d",&len);
int i,j,row,k;
for(i = 1, k = len - 1; i <= len; i++)
{
for(j = 1; j <= k; j++)
printf(" ");
k--;
for(row = 1; row <= i*2 -1; row++)
printf("*");
printf("\n");
}
for(i = len - 1, k = 1; i > 0; i--)
{
for(j = 1; j <= k; j++)
printf(" ");
k++;
for(row = 1; row <= i*2 -1; row++)
printf("*");
printf("\n");
}
}