Private Sub Command1_Click()
Cls
Font.Size = 30
Dim n As Integer
Dim sierdun(15) As Integer
n = 1
While n <= 15
sierdun(n) = Int(Rnd * 1000)
n = n + 1
Wend
Dim swap As Integer
n = 1
While n <= 14
If sierdun(n) < sierdun(n + 1) Then
swap = sierdun(n)
sierdun(n) = sierdun(n + 1)
sierdun(n + 1) = swap
End If
n = n + 1
Wend
n = 1
While n <= 15
Print sierdun(n)
n = n + 1
Wend
End Sub
心得体会:在上机操作时由于少写了n=1,结果操作出来数出来的数中最后一个数不是最小的,经过检查后发现了,所以做事一定要细心。最大的感慨是这次发表博客太不容易了,周四在机房操作没连上网,周五两次路过电子阅览室都没开门,我在手机上操作了4、5遍都没发表成功,心好累呀!这三天都在假期阅览室不开门,没办法只好今天才发博客了。