VBScript to sort the Array elements using Bubble sort
kw.vbs
arr=Array(1000,900,800,700,600,500,400,300,200,100)Fori=LBound(arr)toUBound(arr)Forj=LBound(arr)toUBound(arr)-1Ifarr(j)>arr(j+1)Thentemp=arr(j+1)arr(j+1)=arr(j)arr(j)=tempEndIfNextNextFori=LBound(arr)ToUBound(arr)sorted=sorted&arr(i)&" "Nextprint"Sorted Array Is "&sorted
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.