1.Private Sub Command1_Click()
For i = 1 To 20
aa = aa + Cj(i)
Next i
Print aa
End Sub
Function Cj(n) ' 阶乘
nn = 1
For i = 1 To n
nn = nn * i
Next i
Cj = nn
End Function
2
Private Sub Command2_Click()
For i = 1 To 6
bb = bb + s1(i)
Next i
Print bb
End Sub
Function s1(n) As Double
s1 = 0
For i = 1 To n
s1 = s1 & 2
Next i
End Function