- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main(){
- int score;
- cout<<"請輸入你的成績:";
- cin>>score;
- if (score==100){
- cout<<"哇!滿分!"<<endl;
- }
- else if(score<100&&score>=60){
- cout<<"你及格了!"<<endl;
- }
- else if(score<60&&score>0){
- cout<<"不及格!"<<endl;
- }
- else if(score==0){
- cout<<"零分!"<<endl;
- }
- else{
- cout<<"輸入錯誤!"<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |