📄 3_13.asp
字号:
<HTML><TITLE>排序</TITLE>
产生10个在0到100之间的随机数:<BR><BR>
<SCRIPT language="VBScript" runat=server>
dim a(10),i,j,k,temp
i=1
randomize
while i<=10
a(i)=int((100-0+1)*rnd)
response.write cint(a(i))&" "
i=i+1
wend
response.write "<BR><BR>从大到小排列顺序为:<BR><BR>"
i=1
while i<=9
k=i
j=i+1
while j<=10
if a(k)<a(j) then
k=j
end if
j=j+1
wend
temp=a(i)
a(i)=a(k)
a(k)=temp
response.write cint(a(i))&" "
i=i+1
wend
response.Write a(i)
</SCRIPT>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -