>//输入E
> A
> ABA
> ABCBA
> ABCDCBA
>ABCDEDCBA
#include<stdio.h>
#include<math.h>
int main(void)
{
int line, line_all, row_blank, row_plus, row_minus;
char ch;
scanf_s("%c", &ch);
line_all = ch - 'A' + 1;
for (line=1; line <= line_all; line++)
{
for (row_blank = 0; row_blank < line_all - line; row_blank++)
printf("%c", ' ');
for (row_plus = 0; row_plus < line; row_plus++)
printf("%c", 'A' + row_plus);
for (row_minus = row_plus - 2; row_minus >= 0; row_minus--)
printf("%c", 'A' + row_minus);
printf("\n");
}
getchar();
return 0;
}