#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int score=0;
bool isStart=true;
while(isStart)
{
cout<<"請輸入成績輸入999代表離開成績系統!)";
cin>>score;
if(score=999)
{
isStart=false;
cout<<"離開成績系統"<<endl;
}
else{
if(score>=90)
{
cout<<"優等"<<endl ;
}
else
{
if(score>=80&&score<90)
{
cout<<"甲等"<<endl ;
}
else
{
if(score>=70&&score<80)
{
cout<<"乙等"<<endl;
}
else
{
if(score>=60&&score<70)
{
cout<<"丙等"<<endl;
}
else
{
if(score<=59&&score<=0)
{
cout<<"不及格"<<endl;
}
else
{
cout<<"輸入錯誤"<<endl;
}
}
}
}
}
}
}
system("pause");
return 0;
} |