要怎麼用IF敘述判斷五顆骰子的two pair出來呢?
暴力解也無妨ˊˋ
PS.假設5顆骰子已經random儲存在一個陣列裡面了
a[0],a[1],a[2],a[3],a[4]
THX
更新1:
TO bean_bottom_2 Sure thanks!
更新2:
thanks.. another question is if there is "33314" ,how to judge it as "one pair"?
TO bean_bottom_2 Sure thanks!
thanks.. another question is if there is "33314" ,how to judge it as "one pair"?
收錄日期: 2021-04-30 13:06:02
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20090326000015KK00721