本帖最後由 tonyh 於 2018-7-11 16:06 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int score;
- cout<<"please enter your scores: ";
- cin>>score;
- if (score==100)
- cout<<"wow good job!"<<endl;
- else if(score<100 && score>=60)
- cout<<" congratulations you have passed:))"<<endl;
- else if(score<60 && score>0)
- cout<<"you have not passed:("<<endl;
- else if(score==0)
- cout<<"0, very bad!"<<endl;
- else
- cout<<"you have entered incorrect marks"<<endl;
- system("pause");
- return 0;
- }
複製代碼 |