[問題] 比較數字相同否

看板C_and_CPP作者 (Firefighter)時間9年前 (2014/12/30 13:54), 編輯推噓3(308)
留言11則, 10人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) Linux Ubuntu 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) no 問題(Question): http://i.imgur.com/BNkMnue.jpg
新手發問 請問這該怎麼改 我覺得13行刮號沒錯阿 為何編不過 餵入的資料(Input): 10 20 30 預期的正確結果(Expected Output): They are all different 錯誤結果(Wrong Output): 13行編不過 程式碼(Code):(請善用置底文網頁, 記得排版) 同問題 補充說明(Supplement): 新手發問 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.137.213.175 ※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1419918853.A.877.html

12/30 13:57, , 1F

12/30 14:09, , 2F
if ((a == b) && (b == c)) { }
12/30 14:09, 2F

12/30 14:45, , 3F
if 後面有自己的一組括號, 括號完就接 {} 了
12/30 14:45, 3F

12/30 14:45, , 4F
你那樣寫 if 自己的括號就沒了, 所以要像二樓這樣寫
12/30 14:45, 4F

12/30 15:39, , 5F
XD
12/30 15:39, 5F

12/30 16:58, , 6F
話說為什麼電腦不是 Mac 卻用 clang 但卻不會寫 C
12/30 16:58, 6F

12/30 18:28, , 7F
好奇+1
12/30 18:28, 7F

12/30 19:35, , 8F
有趣的寫法
12/30 19:35, 8F

12/30 23:13, , 9F
py寫太多了嗎XD
12/30 23:13, 9F

12/31 14:35, , 10F
我現在介紹人入門C/C++都叫他們改用clang/lldb了
12/31 14:35, 10F

12/31 16:38, , 11F
嗯.....
12/31 16:38, 11F
文章代碼(AID): #1KeZu5Xt (C_and_CPP)