A-E

 

 

 

 

#include <iostream>

#include <cstdio>

using namespace std;

int a,b,c,d;

void fun(int x)

{

    if(x<=100&&x>=90) cout<<"A"<<endl;

    else if(x<=89&&x>=80) cout<<"B"<<endl;

    else if(x<=79&&x>=70) cout<<"C"<<endl;

    else if(x<=69&&x>=60) cout<<"D"<<endl;

    else if(x<=59&&x>=0) cout<<"E"<<endl;

    else cout<<"Score is error!"<<endl;

}

int main()

{

    while(scanf("%d",&a)!=EOF)//这里每次读一个,而不是每次读四个(因为输入的不一定是4的倍数)

    {

        fun(a);

    }

    return 0;

}

posted @ 2021-01-01 09:58  py佐料  阅读(87)  评论(0编辑  收藏  举报