main( )
{
int score=0,sel=0;
scanf("%d",&score);
if (score>=85 && score {
sel = 1;
}else if (score>=70 && score {
sel = 2;
}else if (score>=60 && score {
sel = 3;
}else if (score {
sel =4;
}
switch (sel)
{
case 1:printf("优\n");break;
case 2:printf("良\n");break;
case 3:printf("及格\n");break;
case 4:printf("不及格\n");break;
default:printf("分数等级无效\n");break;
}
}
66
及格
Press any key to continue