您的位置:首页 > 编程语言 > ASP

asp 实现的冒泡排序程序

2009-11-06 18:53 211 查看
arr = array(12,52,14,43,24,58,15,64,24,57,17,56,45)
arrLen = ubound(arr)

for i=0 to arrLen-1
for j = 0 to (arrlen -1)-i
if arr(j)>arr(j+1) then
temp = arr(j)
arr(j)= arr(j+1)
arr(j+1) = temp
end if
next
next

for each l in arr
response.Write l&"<br>"
next
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: