推 kencool107:受教了 謝謝 03/25 21:22
※ 引述《kencool107 (臉都歪了)》之銘言:
: 如果我想要取亂數0~4
: Math.round(Math.random()*4)是這樣寫
: 但是如果我想取亂數0~4但不包含3
: 那我要怎麼寫呀?
: 教教我
do {
num=Math.round(Math.random()*4)
} while (num==3);
trace(num)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.235.208.203