void main()
{
int scores;
char grade;
scanf("%f",&scores);
if (scores>=60)
{
if (scores>=70)
{
if (scores>=80)
{
if(scores>=90) printf("scores=%f,grade=A\n",scores,grade);
else printf("scores=%f,grade=B\n",scores,grade);
}
else printf("scores=%f,grade=C\n",scores,grade);
}
else printf("scores=%f,grade=D\n",scores,grade);
}
else printf("scores=%f,grade=E\n",scores,grade);
}
题目:
给出一个百分制成绩,要求输出成绩等级‘A','B','C','D', 'E'.90以上A,80~89为B,70~79为C,60~69为D,60以下是E。