asp问题
<%'''产生isum个不重复的随机数,istart为最小值,iend为最大值
Function rndstr(istart,iend,isum)
Dim i,j,vntarray(),arr(9)
ReDim vntarray(iend-istart)
j=istart
For i=0 To iend-istart
vntarray(i)=j
j=j+1
Next
Dim vntarray2(),temp,x,y
ReDim vntarray2(isum-1)
y=iend-istart+1
x=0
temp=vntarray
Do While x<isum
Dim a
Randomize
vntarray2(x)=temp(int(rnd*y))
a=" "&vntarray2(x)&" "
temp=split(trim(replace(chr(32)&join(temp)&chr(32),a," ")))
x=x+1
y=y-1
Loop
rndstr=join(vntarray2)
End Function
Response.write rndstr(0,9,10)
%>
产生十个随机数,要如何保存到一个一维数组?谢谢
补充:VB , 网络编程