在VB程序中,在标准模块中编写自定义函数Fac,实现求整数n的阶乘。写出程序代码
第1个回答 2014-11-10
Public Function Fac(ByVal n As integer) As Long
Dim i As Integer
For i=1 to n
Fac=Fac*i
Next i
End Function本回答被网友采纳
Dim i As Integer
For i=1 to n
Fac=Fac*i
Next i
End Function本回答被网友采纳