You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
720 B

//<2F><><EFBFBD><EFBFBD>
#include<stdio.h>
void pr_start(int _num)
{
int n=0;
int i = 0;
for (n = 1; n <= 2*_num; n++)
{
int temp = n;
if (n > _num)
{
temp -= 2 * (n - _num);
}
for (i = 1; i < 2 * _num; i++)
{
if ((i>=(_num - temp + 1 )) && (i<=(temp + _num-1)))
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
}
int main()
{
int num = 0;
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Σ<EFBFBD>");
scanf("%d", &num);
pr_start(num);
return 0;
}