#include
#include
char arr[1000];
void output(int n, char ch){
int count = 0;
int tot = 2*(n-1) + 1;
int i, j;
while(count != tot){
if(ch > 'Z')
ch = 'A';
if(ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U'){
ch++;
continue;
}
arr[++count] = ch++;
}
for(i = n; i >= 1; --i){
for(j = 0; j < n-i; ++j)
printf(" ");
if(n-i+1 == tot-n+i){
printf("%c\n", arr[n-i+1]);
continue;
}
printf("%c", arr[n-i+1]);
for(j = 0; j < 2*(i-1)-1; ++j)
printf(" ");
printf("%c", arr[tot-n+i]);
printf("\n");
}
for(i = 2; i <= n; ++i){
for(j = 0; j < n-i; ++j)
printf(" ");
printf("%c", arr[n-i+1]);
for(j = 0; j < 2*(i-1)-1; ++j)
printf(" ");
printf("%c", arr[tot-n+i]);
printf("\n");
}
}
int main(){
int i;
char ch;
scanf("%d %c", &i, &ch);
output(i, ch);
return 0;
}
昨天帮一个人写的 不知道你们是不是一个学校的