#include <iostream>
using namespace std;
int main()
{
float score;
char grade;
cout <<"请输入学生成绩"<<'\n';
cin >>score;
while (score>100||score<0)
{
cout <<"请重新输入"<<'\n';
cin >>score;
}
switch (grade)
{
case'A':cout<<"90~100\n";
case'B':cout<<"80~89\n";
case 'C':cout<<"70~79\n";
case 'D':cout<<"60~69\n";
case'E':cout<<"<60\n";
default:cout<<"error\n";
break;
}
cout << "score is"<<score<<",grade is"<<grade<<endl;
return 0;
}
调试出现下面情况