logo头像

You name it , I got it !

[筆記] ASP 亂數陣列

本文于1272天之前發表,文章內容可能已經過時。

尾牙可能會用到…

簡單說就是XX排序,不過我忘記那個名詞了.. (bubble ? )

dim myarray(60)

for i = 1 to 60

myarray(i) = i

Next

for j = 1 to 59

randomize

j1 = Int((60-1+1) * Rnd +1 )

k1 = Int((60-1-1)*Rnd+1)

t1 = myarray(j1)

myarray(j1) = myarray(k1)

myarray(k1) = t1

Next