阶乘的

来源:互联网 发布:税控盘服务软件 编辑:程序博客网 时间:2024/04/29 12:09
Private Sub Command1_Click()
Cls
Font.Size = 70
Print 阶乘(12)
End Sub

Private Function 阶乘(n As Integer) As Long
If n = 1 Then
阶乘 = 1
Else
阶乘 = n * 阶乘(n - 1)
End If
End Function

0 0