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
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