怎么求1到100的阶乘和??
Private Sub Command1_Click()Private Function jiecheng(n As Integer) As Long
Dim result As Long
Dim sum As Long
Dim i As Integer
result = 1
sum = 0
For i = 1 To n
result = result * i
sum = sum + result
Next i
jiecheng = sum
End Function
End Sub
这个程序运行说是缺少end sub 怎么改正?如果是错的,请给我一个正确的 过程里面放函数……
把最后一行移动到第二行吧,老爷 100 的阶乘.....
long 也放不下.
补充:VB , 非技术类