Dim sum As Integer
Dim i As Integer
Dim a As Integer
Private Sub Command1_Click()
sum = 0
For i = 1 To 10
Randomize
a = Int(1000 * Rnd)
sum = sum + a
Next
MsgBox "10个随机数和为:" & sum
End Sub
Dim i As Integer
Dim a As Integer
Private Sub Command1_Click()
sum = 0
For i = 1 To 10
Randomize
a = Int(1000 * Rnd)
sum = sum + a
Next
MsgBox "10个随机数和为:" & sum
End Sub