|
- arrTestArray = Array("9","49","17","2","1")
- BubbleSort arrTestArray
- for i = 0 to UBound(arrTestArray)
- Response.Write arrTestArray(i) & vbnewline
- Next
- Function BubbleSort(arrValues)
- Dim j, k, Temp
- For j = LBound(arrValues) To UBound(arrValues)
- For k = j + 1 To UBound(arrValues)
- If (clng(arrValues(j)) > clng(arrValues(k))) Then
- Temp = arrValues(j)
- arrValues(j) = arrValues(k)
- arrValues(k) = Temp
- End If
- Next
- Next
- End Function
复制代码
纯数字可以,输出的时候最好处理下类似这样,然后根据指定的数字去获取对应字符串
|
|