#include <stdio.h>
#include <stdlib.h>
int main()
{
int score,grade;
printf("Input score ");
scanf("%d",&score);
grade=score<0||score>100?-1:score/10;
if(score>=90&&score<=100)
{
printf("A");
}
else if(score>=80&&score<90)
{
printf("B");
}
else if(score>=70&&score<80)
{
printf("C");
}
else if(score>=60&&score<70)
{
printf("D");
}
else if(score>=0&&score<60)
{
printf("E");
}
return 0;
}
if-else
最新推荐文章于 2022-11-26 19:53:51 发布