我在書上看到的,有誰會嗎???謝謝~!
Step: Rewrite each condition below in valid Java syntax (give a boolean expression):
a.) x > y > z
b.) x and y are both less than 0
c.) neither x nor y is less than 0
d.) x is equal to y but not equal to z
2006-10-06 05:12:33 · 1 個解答 · 發問者 Anonymous in 電腦與網際網路 ➔ 程式設計
請參考我的做法a.) x > y > zif (x > y && y > z)b.) x and y are both less than 0if (x < 0 && y < 0)c.) neither x nor y is less than 0if (!(x < 0) && !(y < 0))d.) x is equal to y but not equal to z if (x == y && x != z)
2006-10-06 09:29:23 · answer #1 · answered by ? 7 · 0⤊ 0⤋