#include <iostream>
using namespace std;
int main()
{
int grade;
cout<<"Please input a grade(A,B,C or D):";
cin>>grade;
switch(grade){
case 'A':
cout<<"100--90"<<endl;
case 'B':
cout<<"89--80"<<endl;
case 'C':
cout<<"79--70"<<endl;
case 'D':
cout<<"69--60"<<endl;
case 'E':
cout<<"Less then 60"<<endl;
default:
cout<<"Input error!\n";
}
return 0;
}
这个程序运行出来有BUG 不管输入什么 输出的都是Input error!
help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
查看全部回复
我也来说两句
