3333

C 小問題

1.看不懂這句NOTE:An automatic type coercion occurs after evaluation but before the value is stored if the types differ for Expression and Variable.2.為什麼這兩個值不一樣?float(7/4) has value 1.0float(7)/float(4) has value 1.75
應該是指這個。

http://caterpillar.onlyfun.net/Gossip/CppGossip/ArithmeticOperator.html算術運算子使用不難

但要注意型態轉換的問題

請您先看看這段程式會印出什麼結果? int number = 10; cout

arrow
arrow

    小行星列表/3201 發表在 痞客邦 留言(0) 人氣()