Private Sub Command1_Click()
Dim a As Double, b As Integer, r As Single, n As Integer
n = 0
r = 0.01
a = 12
Do While a >= 20
a = a * (1 + r)
n = n + 1
Loop
Print n
End Sub
Private Sub Command1_Click()
Dim a As Double, b As Integer, r As Single, n As Integer
n = 0
r = 0.01
a = 12
Do While a 〈 20
a = a * (1 + r)
n = n + 1
Loop
Print n
End Sub
改成这样就可以执行了!!