hdoj2004

 #include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int x;
    while( cin >> x)
    {
           if( x < 0 || x > 100)
           {
               cout << "Score is error !" << endl;
               }
               else if( x >= 90)
               {
                    cout << "A" << endl;
                    }
                    else if( x >= 80)
                    {
                         cout << "B" << endl;
                         }
               else if( x >= 70)
                    {
                         cout << "C" << endl;
                         }
               else if( x >= 60)
                    {
                         cout << "D" << endl;
                         }
                         else cout << "E" << endl;
           }
    system("pause");
    }


 

你可能感兴趣的:(hdoj2004)