1. #include<stdio.h>
void main() {
char grade[10];
printf("请输入您的成绩等级:");
scanf("%s", grade);
if (stricmp("A", grade))
printf("成绩等级为A");
else if (stricmp("B", grade))
printf("成绩等级为B");
else if (stricmp("C", grade))
printf("成绩等级为C");
else if (stricmp("D", grade))
printf("成绩等级为D");
else if (stricmp("E", grade))
printf("成绩等级为E");
else
printf("成绩等级未知");
}
标签:练习题,grade,C语言,else,等级,printf,成绩,stricmp,程序代码 From: https://blog.51cto.com/u_16284470/8475810