#include
void main()
{
float score;
printf("输入分数:");
scanf("%f",&score);
if(score>=90 && score<=100)printf("优秀\n");
else if(score>=80)printf("良好\n");
else if(score>=70)printf("中等\n");
else if(score>=60)printf("及格\n");
else if(score>=0)printf("不及格\n");
else printf("error\n");
}
#include
void main()
{
float score;
int flag;
printf("输入分数:");
scanf("%f",&score);
if(score>=90)flag=1;
if(score>=80&&score<=89)flag=2;
if(score>=70&&score<=79)flag=3;
if(score>=60&&score<=69)flag=4;
if(score<60)flag=5;
switch(flag)
{
case 1:printf("优秀");break;
case 2:printf("良好");break;
case 3:printf("中等");break;
case 4:printf("及格");break;
case 5:printf("不及格");break;
default:printf("error\n");
}
printf("\n");
}