这题十分十分的简单。
只需用到else if和if。
代码如下:
#include<iostream>
using namespace std;
int main()
{
int b;
cin>>b;
if(b>=90) {
cout<<"Excellent";
}
else if(b>=80&&b<90){
cout<<"Good";
}
else if(b>=60&&b<80){
cout<<"Pass";
}
else if(b<60){
cout<<"Fail";
}
return 0;
}
完事!