#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
bool j=true;
int z=0;
cout<<"輸入成績(若輸入666代表離開)"<<endl;
while(j)
{
cin>>z;
if(z==666)
{
j=false;
}
else{
if (z<=100&&z>=90){
cout << "SS" << endl;
}
else if(z<=89&&z>=80){
cout << "S" << endl;
}
else if(z<=79&&z>=70){
cout << "A" << endl;
}
else if(z<=69&&z>=60){
cout << "B" << endl;
}
else if(z<=59&&z>=0){
cout << "C" << endl;
}
else {
cout << "XXXXXXXXXXXXXXXXXXXXX" << endl;
}
cout<<"輸入成績(若輸入666代表離開)"<<endl;
}
}
system("pause");
return 0;
} |