文章已搬家,請點擊前往👈

 

 

 

 

How to find out the largest one of the two numbers without judgement statements.

max(a, b)...正解,這題題目限制不能用if, switch或? :的語法,但沒說不能用math的max。

不過這樣就太簡單了,所以我們假定不能用內建函式。

arrow
arrow
    文章標籤
    max 演算法 algorithm
    全站熱搜

    emn178 發表在 痞客邦 留言(0) 人氣()