杭电OJ-2004

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

你可能感兴趣的:(杭电OJ-2004)