10得阶乘

来源:互联网 发布:wdcp数据库备份在哪里 编辑:程序博客网 时间:2024/06/06 06:37
Private Sub Command1_Click()
Print 阶乘(10)
End Sub
Private Function 阶乘(n As Integer) As Long
If n = 1 Then
  阶乘 = 1
  Else
  阶乘 = n * 阶乘(n - 1)
  End If
 
 

End Function

0 0
原创粉丝点击