主题:为什么着段代码执行不了,谢谢!!
<html>
<head>
<title>排序的事例</title>
</head>
<body>
题目:从0—99中随机选20个数字出来进行排序。
<%
Dim A (20),i,j,temp
for i=0 to 19
A(i)=CInt(Rnd*100)'指定A(i)的20个值从0-99中任意选取
next
response.write "原数组为:<br>"
response.write "<table border=2 bgcolor=#aaffff><tr>"
for i=0 to 19
response.write "<td>" &A(i) & "</td>"
next
response.write "</tr></table>"
for i=0 to 19
for j=i to 19'如果A(i)大于A(j),则两个数值做交换
if A(i)>A(j) then
temp=A(i)
A(i)=A(j)
A(j)=temp
end if
next
next
response.write "排序之后的数列为:<br>"
response.write "<table border=2 bgcolor=#ffffaa><tr>"
for i=0 to 19
response.write "<td>" &A(i) &"</td>"
next
response.write "</tr></table>"
%>
</body>
</html>
<head>
<title>排序的事例</title>
</head>
<body>
题目:从0—99中随机选20个数字出来进行排序。
<%
Dim A (20),i,j,temp
for i=0 to 19
A(i)=CInt(Rnd*100)'指定A(i)的20个值从0-99中任意选取
next
response.write "原数组为:<br>"
response.write "<table border=2 bgcolor=#aaffff><tr>"
for i=0 to 19
response.write "<td>" &A(i) & "</td>"
next
response.write "</tr></table>"
for i=0 to 19
for j=i to 19'如果A(i)大于A(j),则两个数值做交换
if A(i)>A(j) then
temp=A(i)
A(i)=A(j)
A(j)=temp
end if
next
next
response.write "排序之后的数列为:<br>"
response.write "<table border=2 bgcolor=#ffffaa><tr>"
for i=0 to 19
response.write "<td>" &A(i) &"</td>"
next
response.write "</tr></table>"
%>
</body>
</html>