多多支持,
2014年(20)
分类: C/C++
2014-11-27 20:07:41
#include
int main()
{
int score;
scanf("%d", &score);
if (score > 100)
{
printf("分数在0 - 100之间\n");
return 0;
}
else if (score < 0)
{
printf("分数在0 - 100之间\n");
return 0;
}
else if (score >= 90)
{
printf("成绩等级为 'A' \n");
}
else if (score >= 80)
{
if(score <= 89 )
{
printf("成绩等级为 'B' \n");
}
}
else if (score >= 70)
{
if (score <=79 )
{
printf("成绩等级为 'C' \n");
}
}
else if (score >= 60)
{
if(score <= 69 )
{
printf("成绩等级为 'D' \n");
}
}
else if (score <= 60)
{
printf("成绩等级为 'E' \n");
}
return 0;
}