1 char t; 2 t = getchar(); 3 int count = t - 96; 4 if(t >= 97 && t <= 122) 5 { 6 int charNum = count; 7 for(int i = 1;i <= count;i++) 8 { 9 for(int i1=1;i1 <= charNum;i1++) 10 { 11 printf(" "); 12 } 13 14 for(int i2 = 1;i2 <= count - charNum +1;i2++) 15 { 16 printf("%c",96 + i2); 17 18 } 19 20 for(int i3 = 1;i3 <= count - charNum;i3++) 21 { 22 printf("%c",97 + count - charNum - i3); 23 } 24 25 26 printf("\n"); 27 charNum--; 28 } 29 30 } 31 32 33 34 return 0;
时间: 2024-10-07 20:29:41