[单项选择题] 阅读程序:
Function fac(ByVal n As Integer)As Integer
Dim temp As Integer
temp=1
For i%=1 To n
temp=temp*i%
Next i%
fac=temp
End Function
Private Sub Form_Click()
Dim nsum As Integer
nsum=1
For i%=2 To 4
nsum=nsum+fac(i%)
Next i%
Print nsum
End Sub
程序运行后,单击窗体,输出结果是( )。
A.35
B.31
C.33
D.37