帮忙看看哪里错,30分快来抢
程序代码:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Sub procmin(ByRef a%(), ByVal min%) Dim i% min = a(0) For i = 0 To UBound(a) If a(i) < min Then min = a(i) Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a(9) As Integer, j As Integer, min As Integer For j = 0 To UBound(a) a(j) = Int(Rnd() * 100 + (-400)) Call procmin(a(j), min) Next Label1.Text = "min=" & min End Sub End Class