#include <stdio.h>
void main()
{
int i, j, k;
for (i = 1; i <= 4; i++)
{
for (j = 1; j <=4-i; j++)
printf(" “);
for (k = 1; k <= (2 * i - 1); k++)
printf(”");
printf("\n");
}
for (i = 1; i <= 3; i++)
{
for (j = 1; j <= i; j++)
printf(" ");
for (k = 1; k <= 7-2i; k++)
printf("*");
printf("\n");
}
}
C语言:打印菱形图案
最新推荐文章于 2024-11-01 16:23:20 发布