- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int score;
- cout<<"Insert your score: ";
- cin>>score;
- if (score==100)
- {
- cout<<"Wow! Full marks!"<<endl;
- }
- else if (score<=100&&score>=60)//60-99
- {
- cout<<"Congrats on getting a full mark!"<<endl;
- }
- else if (score<60&&score>=1)//1-59
- {
- cout<<"Didn't pass!"<<endl;
- }
- else if (score==0)
- {
- cout<<"Zero?"<<endl;
- }
- else if (score<0&&score>100)//0-100
- {
- cout<<"Error."<<endl;
- }
- system("pause");
- return 0;
- }
複製代碼 |