  
|
201 選擇敘述與迴圈 (奇偶數判斷)
1. 題目說明:
請依下列題意進行作答,使輸出值符合題意要求。
2. 設計說明:
請撰寫一程式,讓使用者輸入一個整數,判斷該整數為奇數或偶數,若為奇數,則輸出「odd」;若為偶數,則輸出「even」。
提示:若使用 Java 語言答題,請以「JP」開頭命名包含 main 靜態方法的 class,評測系統才能正確評分。
3. 輸入輸出:
輸入說明
一個整數
輸出說明
該整數為odd或even
範例輸入1
80
範例輸出1
even
範例輸入2
25
範例輸出2
odd
本帖隱藏的內容需要回復才可以瀏覽 |
|