國立屏東商業技術學院 資訊工程系 物件導向程式設計
練習if, switch與條件運算式。
Input your score: 80 You are pass!
Input your score: 59 You are fail!
Input your score: 110 Error!
Input your score: -10 Error!
\\
Please input a number: 3 The sum of 1 to 3 is 6.
Please input a number: 12 Your input larger than 10.
Please input a number: 0 Error
day | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
---|---|---|---|---|---|---|---|
weak up time | 7:30 | 8:30 | 8:30 | 7:30 | 8:30 | 10:00 | 10:00 |
Input (0-6) : 3 You have to weak up on 8:30.
Input (0-6) : 1 You have to weak up on 7:30.
Input (0-6) : 0 You have to weak up on 10:00.
grade | A | B | C | D | E |
---|---|---|---|---|---|
comment | Excellent | Good | Average | Poor | Failing |
Grade (A-E) : A Excellent
Grade (A-E) : c Average
Grade (A-E) : E Failing
Enter month (0-12): 6 Enter day (0-31): 1 Your input date is 1st day of June.
Enter month (0-12): 7 Enter day (0-31): 11 Your input date is 11th day of July.
Enter month (0-12): 8 Enter day (0-31): 2 Your input date is 2nd day of August.
Enter month (0-12): 6 Enter day (0-31): 21 Your input date is 21st day of June.