#include<stdio.h>
main()
{
int num;
while (num != 0){
if (num == 0)
return 0;
printf("Enter a number (3-77):\t");
scanf("%ld", &num);
while (num>77 num<3){
printf("Enter error!\n");
printf("Please enter a number(3-77):");
scanf("%d", &num);
}
for (int i=0; i<=(num-1)/2; i++)
{
for (int k=0; k<=num/2-i; k++)
printf(" ");
for (int j=0; j<=2*i; j++)
printf("*");
printf("\n");
}
for (int w=0; w<=num/2; w++){
for (int m=-1; m<=w; m++)
printf(" ");
for (int n=1; n<=(num-2)-2*w; n++)
printf("*");
printf("\n");
}
}
}