C语言实现成绩等级评定:百分制成绩转换A、B、C、D、E等级
#include <stdio.h>
int main() { int score; printf("请输入成绩:"); scanf("%d", &score);
if (score >= 90) {
printf("成绩等级为:A\n");
} else if (score >= 80) {
printf("成绩等级为:B\n");
} else if (score >= 70) {
printf("成绩等级为:C\n");
} else if (score >= 60) {
printf("成绩等级为:D\n");
} else {
printf("成绩等级为:E\n");
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/oSQu 著作权归作者所有。请勿转载和采集!