Private Sub Command1_Click()
Cls
Dim sum As Integer, i As Integer, a As Integer
sum = 0
i = 1
Do Until i > 10
Randomize
a = Int(1000 * Rnd)
sum = sum + a
i = i + 1
Loop
MsgBox “10个随机数的和为; ” & sum
End Sub
Private Sub Command1_Click()
Cls
Dim sum As Integer, i As Integer, a As Integer
sum = 0
i = 1
Do Until i > 10
Randomize
a = Int(1000 * Rnd)
sum = sum + a
i = i + 1
Loop
MsgBox “10个随机数的和为; ” & sum
End Sub