- #include<iostream>
- using namespace std;
- int main()
- {
- int score;
- cout<<"請輸入你的成績:";
- cin>>score;
- cout<<"你的成績是"<<score<<"分"<<endl;
- if(score==100)
- {
- cout<<"挖!滿分!"<<endl;
- }else if(score>=60 && score<100) //&& ---> and
- {
- cout<<"恭喜你及格了!"<<endl;
- }else if(score>0 && score<60)
- {
- cout<<"糟糕不及格請再努力!"<<endl;
- }else if(score==0)
- {
- cout<<"鴨蛋!吃棍子吧!"<<endl;
- }else if(score>100)
- {
- cout<<"你唬我啊!吃鞭子吧!"<<endl;
- }else
- {
- cout<<"別玩了,再胡鬧我扁你!"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |