算法6 冒泡法排序
代码如下:
For i = 1 To n - 1 For j = 1 To n-i If a(j) > a(j+1) Then temp=a(j): a(j)=a(j+1): a(j+1)=temp End if Next j Next i