填空题
执行下面的程序,单击命令按钮Command1后,显示在窗体上的第一行内容是
1,最后一行内容是
2。
Option Explicit
Dim N As Integer
Private Sub Command1_Click()
Dim I As Integer, J As Integer
For I=3 To 1 Step-2
N=Fun(I, N)
Print N
Next I
End Sub
Private Function Fun(A As Integer, B As Integer)As Integer
Static X As Integer
X=X+B
B=B+X+N
A=A+1
Fun=A+B
End Function