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;
}
原文地址: http://www.cveoy.top/t/topic/miSp 著作权归作者所有。请勿转载和采集!