【c语言】给出100分制成绩，要求输出成绩等级A,B,C,D,E。90分以上为A，80~89位B，70~79位C ，60~69位D，60以下为E

// 给出100分制成绩，要求输出成绩等级A,B,C,D,E。90分以上为A，80~89位B，70~79位C ，60~69位D，60以下为E

#include <stdio.h>

int main()
{
int a;
printf("请输入成绩：");
scanf("%d",&a);
if(a >= 90)
printf("等级是A\n");
else if(a >= 80 && a <= 89)
printf("等级是B\n");
else if(a >= 70 && a <= 79)
printf("等级是C\n");
else if(a >= 60 && a <= 69)
printf("等级是D\n");
else
printf("等级是E\n");

return 0;
}

<img src="https://img-blog.csdn.net/20150423122823909?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

<img src="https://img-blog.csdn.net/20150423122831616?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

<img src="https://img-blog.csdn.net/20150423122839182?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

<img src="https://img-blog.csdn.net/20150423122847122?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

<img src="https://img-blog.csdn.net/20150423123017172?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvemhhb3lhcWlhbjU1Mg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />



04-09 1786
10-17 1万+

08-22 6851
03-21 5547
04-23 8086
04-23 3783
06-22
02-08 2873