答案:
#include <iostream>
using namespace std;
int main()
{
int score;
cout<<"Please input socre:";
cin>>score;
if(score<0||score>100)
{
cout<<"The entered score is wrong. Please enter a score in the range of 0-100";
}
else
{
switch(score/10)
{
case 10:
case 9:cout<<'A';break;
case 8:cout<<'B';break;
case 7:cout<<'C';break;
case 6:cout<<'D';break;
default:cout<<'E';break;
}
}
cout<<endl;
return 0;
}