Private Sub Command1_Click()
Dim i As Integer, n As Integer
For i = 1 To 10
n = n + a(Int(Rnd * 20), Int(Rnd * 30))
Next
Print n
End Sub
Function a(ByVal x As Integer, ByVal y As Integer) As Integer
Dim t As Integer
If x > y Then t = x: x = y: y = t
a = x + Int((y - x + 1) * Rnd)
End Function
x^3