问题详情

答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关

阅读程序:Function fac(ByVal n As Integer)As IntegerDim temp As Integertemp=1For i%=1 To nt


阅读程序:

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

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题