将以下程序补充完整,实现输出以下图形:
****
*****
*******
*********
***********
*************
int main() { int line; int n; int a,b,d; char letter,e; printf("===============================================================================\n"); printf("***************************欢迎来到美丽的字母世界******************************\n"); printf("===============================================================================\n"); /*对输入数据进行检测*/ do{ printf("请输入1到26之间您想输入的的数字: "); scanf("%d",&n); }while(n <= 0 || n >=27); /*判断并且打印字母菱形的上半部分*/ for(line = 1 ;line <= n ;line++) { letter = 65; for(a = 1;a <= n-line;a++) { printf(" "); /*空格*/ } for(b = 1;b <= line;b++) /*打印左半部分*/ { printf("%c",letter); letter += 1; e = letter; } letter = e - 2; for(d = 2;d <=line;d++) /*打印右半部分*/ { printf("%c",letter); letter -= 1; } printf("\n"); } /*打印字母菱形的下半部分*/ for(line = 1 ;line <= n ;line++) { letter = 65; for(a = 1;a <= line;a++) { printf(" "); /*空格*/ } for(b = 1;b <=(n -line) ;b++) /*打印左半部分*/ { printf("%c",letter); letter += 1; e = letter; } letter = e-2; for(d = 2;d <= n-line;d++) /*打印右半部分*/ { printf("%c",letter); letter -= 1; } printf("\n"); } return 0; }