- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- bool isStart=true;
- while(isStart)
- {
- int score;
- cin>>score;
- cout<<"超過999結束"<<endl;
- if(score==999)
- {
- isStart=false;
- cout<<"結束"<<endl;
- }
- else
- {
-
- if(score>=91 && score<=100)
- {
- cout<<"優等"<<endl;
- }
- if(score>=80 && score<90)
- {
- cout<<"甲等"<<endl;
- }
- if(score>=70 && score<81)
- {
- cout<<"乙等"<<endl;
- }
- if(score>=60 && score<79)
- {
- cout<<"丙等"<<endl;
- }
- if(score>=0 && score<59)
- {
- cout<<"不及格"<<endl;
- }
- }
- }
- system("pause");
- return 0;
- }
複製代碼 |