杭电 oj 成绩转换

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int score;
    while(scanf("%d",&score)!=EOF)
    {
        if(score<0||score>100)
            printf("Score is error!\n");
        if(score>=90&&score<=100)
            printf("A\n");
        if(score>=80&&score<=89)
            printf("B\n");
        if(score>=70&&score<=79)
            printf("C\n");
        if(score>=60&&score<=69)
            printf("D\n");
        if(score>=0&&score<=59)
            printf("E\n");
    }
    return 0;
}

 

posted @ 2019-03-31 15:50  pipiforever  阅读(317)  评论(0编辑  收藏  举报