Private Sub Command1_Click()
Dim a() As Integer
Dim b() As Integer
Dim c() As Integer
Dim i As Integer
Dim N As Integer
re:
N = Rnd(1)*70
If N < 30 Then GoTo re:
ReDim a(1 To N)
ReDim b(1 To N)
ReDim c(1 To N)
For i = 1 To N
re1:
a(i) = Rnd(1)*70
If a(i) < 30 Then GoTo re1:
re2:
b(i) = Rnd(1)*70
If b(i) < 30 Then GoTo re2:
If (i Mod 2) = 1 Then
c(i) = a(i) + b(i)
Else
c(i) = a(i) * b(i)
End If
Next i
End Sub
[[it] 本帖最后由 我是菜鸟哦 于 2008-12-11 17:12 编辑 [/it]]