Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a$(5), i%, max%, min%, s$
For i = 0 To 5
a(i) = Int(Rnd() * 94 + 6)
If a(i) > max Then max = a(i)
If a(i) < min Then min = a(i)
s = s & a(i) & " "
Next
Label1.Text = s & vbCrLf & "最大值是:" & max & Space(4) & "最小值是:" & min
End Sub