Dim n as Integer
n = InputBox("请输入有多少个数N")
dim i as Integer,j as Integer
dim Mat() as Integer
Redim Mat(n) as Integer
Dim t as Integer
For i = 1 to n
Mat(i) = Rnd * 100
Next
For i = 1 to n
For j = 1 to n-1
if ( Mat(j+1)> Mat(j) ) Then
t = Mat(j+1)
Mat(j+1) = Mat(j)
Mat(j) = t
End if
Next
next
For i = 1 to n
Print Mat(i);
next