Elaine's World
顯示具有
C
標籤的文章。
顯示所有文章
顯示具有
C
標籤的文章。
顯示所有文章
2016年8月3日 星期三
不用條件敘述判斷奇偶數(Judge a number is even or odd without selection statement)
判斷一整數是否為偶數,若為偶數則輸出1,若否則輸出0
input: 123
output: 0
input: -12
output: 1
直觀法可用if-else判斷:
閱讀更多 »
較舊的文章
首頁
訂閱:
文章 (Atom)