Last active
November 9, 2017 11:17
-
-
Save hansen033/3402faad83c507ff49c3f40b0b994a2a to your computer and use it in GitHub Desktop.
2017/10/26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int score; | |
cout << "輸入非0~100的數來退出\n"; | |
while (true){ | |
cout << "\n\n請輸入成績來判別等第:\n"; | |
cin >> score; | |
if (score<60 && score>=0){ | |
cout << "成績是 丁 等(不及格)"; | |
} else if (score<70 && score>=60){ | |
cout << "成績是 丙 等"; | |
} else if (score<80 && score>=70){ | |
cout << "成績是 乙 等"; | |
} else if (score<90 && score>=80){ | |
cout << "成績是 甲 等"; | |
} else if (score<=100 && score>=90){ | |
cout << "成績是 優 等"; | |
} else { | |
break; | |
} | |
} | |
cout <<"\n\n感謝您的使用,再見!"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment