#include <stdio.h>
int main()
{
char capital, c='A',d='A';
printf("Please input a capital:\n");
scanf("%c", &capital);
for (int i = 0; i <= (capital - 'A') ; i++)
{
int b = 0;
for (; b <= capital - c + 1; b++)
{
printf(" ");
}
d = 'A';
for (; d <= c; d++)
{
printf("%c", d);
}
d = c-1;
for (; d >= 'A'; d--)
{
printf("%c", d);
}
printf("\n");
c++;
}
system("pause");
return 0;
}
大写字幕的金字塔输出
最新推荐文章于 2023-11-08 10:52:47 发布