加入收藏 | 设为首页 | 会员中心 | 我要投稿 银川站长网 (https://www.0951zz.com/)- 云通信、基础存储、云上网络、机器学习、视觉智能!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

asp 达成的冒泡排序程序

发布时间:2023-07-08 13:37:56 所属栏目:Asp教程 来源:
导读:asp 达成的冒泡排序程序:代码如下:arr = array(12,52,14,43,24,58,15,64,24,57,17,56,45)arrLen = ubound(arr)for i=0 to arrLen-1for j = 0 to (arrlen -1)-iif arr(j)>arr(j+1) thentemp = arr(j)arr(j)= arr(j+1

asp 达成的冒泡排序程序:

代码如下:

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

(编辑:银川站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章