Private Sub Command1_Click()
Dim a(20) As Integer
Dim i As Integer
Dim sum As Integer
sum = 1
a(1) = 1
For i = 2 To 20
a(i) = a(i - 1) + 2 * (i - 1) - 1
sum = sum + a(i)
Print sum
Next
都不对啊!你们a(i)表达式都不对啊! Private Sub Command1_Click() Dim a(20) As Integer Dim i As Integer Dim sum As Integer sum = 1 a(1) = 1 For i = 2 To 20 a(i) = a(i - 1) + 2 * (i - 1) - 1