- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main(){
- int score;
- cout<<"請輸入你的成績:";
- cin>>score;
- if (score == 100)
- cout<<"很好喔,考滿分"<<endl;
- else if(score >= 60 and score < 100)
- cout<<"很好喔,有及格"<<endl;
- else if(score >= 1 and score < 60)
- cout<<"真糟糕,不及格"<<endl;
- else if(score == 0)
- cout<<"真糟糕,考零分"<<endl;
- else
- cout<<"不要騙我"<<endl;
-
- system("pause");
- return 0;
- }
複製代碼 |