- #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;
- }
複製代碼 |