1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-03 17:26:21 +00:00
202401-programming-assignments/【额外练习】选择结构/7-11 选择-五分制转百分制.c

22 lines
363 B
C
Raw Normal View History

2024-10-30 15:00:18 +00:00
#include <stdio.h>
int main() {
char grade;
scanf("%c", &grade);
if (grade == 'A') {
printf("85~100\n");
} else if (grade == 'B') {
printf("70~84\n");
} else if (grade == 'C') {
printf("60~69\n");
} else if (grade == 'D') {
printf("<60\n");
} else {
printf("Error\n");
}
return 0;
}