例4.6
程序员文章站
2022-03-25 10:35:28
...
例4.6
#include<stdio.h>
int main()
{
char grade;
scanf("%c",&grade);
printf("Your score:");
switch(grade)
{
case 'A':printf("85~100\n");break;
case 'B':printf("70~84\n");break;
case 'C':printf("60~69\n");break;
case 'D':printf("<60\n");break;
default : printf("enter data error!\n");
}
return 0;
}