顺序交换法:
Dim a%(1 to 10),i%,j%,temp%
For i=1 to 10
a(i)=int((500-200+1)*rnd+200)
print a(i);'排序前数组
next i
print
for i= 1 to 9
for j=i+1 to 10
if a(i)>a(j) then
temp=a(i)
a(i)=a(j)
a(j)=temp
end if
next j
next i
for i =1 to 10
print a(i);'排序后数组
next i
print