一个不错的随机函数
程序员文章站
2022-05-28 20:42:11
<%dim myarrfor i = 0 to 100randomizeno = int((1000-1+1)*rnd+1)for j = 0 to iif no <> myarr...
<%
dim myarr
for i = 0 to 100
randomize
no = int((1000-1+1)*rnd+1)
for j = 0 to i
if no <> myarr(j) and no <> "" then
j = j + 1
else
exit for
end if
myarr(i) = no
next
if i = 21 then
exit for
end if
next
%>
dim myarr
for i = 0 to 100
randomize
no = int((1000-1+1)*rnd+1)
for j = 0 to i
if no <> myarr(j) and no <> "" then
j = j + 1
else
exit for
end if
myarr(i) = no
next
if i = 21 then
exit for
end if
next
%>