1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00
202401-programming-assignments/【额外练习】选择结构/7-38 选择-百分制转五分制.c

24 lines
433 B
C

#include <stdio.h>
int main() {
int t;
scanf("%d", &t);
if (t >= 90 && t <= 100) {
printf("A\n");
} else if (t >= 80 && t <= 89) {
printf("B\n");
} else if (t >= 70 && t <= 79) {
printf("C\n");
} else if (t >= 60 && t <= 69) {
printf("D\n");
} else if (t >= 0 && t <= 59) {
printf("E\n");
} else {
printf("Score is error!\n");
}
return 0;
}