Dim Score(4) As Single
Private Sub Command1_Click()
For i = 0 To 4
Score(i) = Val(Text1(i).Text)
Next i
For i = 0 To 3
For j = i + 1 To 4
If Score(j) > Score(i) Then
t = Score(i)
Score(i) = Score(j)
Score(j) = t
End If
Next j
Next i
Text1(5).Text = Score(0)
Text1(6).Text = Score(4)
Command2.Enabled = True
End Sub
Private Sub Command2_Click()
For i = 1 To 3
Sum = Sum + Score(i)
Next i
Text1(7) = Format(Sum / 3, "0.00")
End Sub
Private Sub Form_Load()
Command2.Enabled = False
End Sub
什么时候要呢?