写到这不会了 ,帮忙看下。
Public Class Form1Dim mark(9) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
Randomize()
Label1.Text = ""
For i = 1 To 10
Label1.Text &= Int(Rnd() * 71) + 30 & " "
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim b, c, max, min As Integer
max = mark(0)
For b = mark(0) To mark(9)
If mark(b) > mark(0) Then
max = mark(b)
End If
Next
min = mark(0)
For c = 0 To 9
If mark(c) > mark(0) Then
max = mark(c)
End If
Next
Label3.Text = max
Label5.Text = min
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim aver, a As Single
aver = 0
For a = mark(0) To mark(9)
mark(a) &= Int(Rnd() * 71) + 30 & " "
aver = aver + mark(a)
Next
mark(9) = aver / 10
Label7.Text = mark(9)
End Sub
End Class