本帖最後由 謝瀞儀 於 2014-8-30 12:05 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int s;
- cout<<"輸入分數:"<<endl;
- cin>>s;
- if (s==100)
- cout<<"哇!滿分!"<<endl;
- else if (s>=70 && s<80)
- cout<<"甘巴爹!加油!"<<endl;
- else if (s>=80 && s<90)
- cout<<"甘巴爹!!快90了!"<<endl;
- else if (s>=90 && s<100)
- cout<<"甘巴爹!甘巴爹!到100更好!"<<endl;
- else if (s>=60 && s<70)
- cout<<"恭喜你及格了!"<<endl;
- else if (s>0 && s<60)
- cout<<"不及格!請再努力!"<<endl;
- else if (s==0)
- cout<<"!?給本宮拖出去斬了!"<<endl;
- else
- cout<<"輸入錯誤?給本宮拖出去斬了!"<<endl;
- system ("pause");
- return 0;
- }
複製代碼 |