asp 实现的冒泡排序程序
程序员文章站
2022-07-05 19:30:24
复制代码 代码如下:arr = array(12,52,14,43,24,58,15,64,24,57,17,56,45) arrlen = ubound(arr) for...
复制代码 代码如下:
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
上一篇: 内分泌失调吃什么 8款美食让内分泌变正常