vb求n阶乘表达式Private Sub Command1_Click()Dim n As Integern = InputBox("请输入一个正整数: ")Print Fac(n)End SubPrivate Function Fac(m) As Long '' '请不要删除该行,只在下一行中填空' For k = 2 to Fac = Fac
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/24 21:26:52
vb求n阶乘表达式Private Sub Command1_Click()Dim n As Integern = InputBox("请输入一个正整数: ")Print Fac(n)End SubPrivate Function Fac(m) As Long '' '请不要删除该行,只在下一行中填空' For k = 2 to Fac = Fac
vb求n阶乘表达式
Private Sub Command1_Click()
Dim n As Integer
n = InputBox("请输入一个正整数: ")
Print Fac(n)
End Sub
Private Function Fac(m) As Long
'' '请不要删除该行,只在下一行中填空'
For k = 2 to
Fac = Fac * k
Next k
End Function
vb求n阶乘表达式Private Sub Command1_Click()Dim n As Integern = InputBox("请输入一个正整数: ")Print Fac(n)End SubPrivate Function Fac(m) As Long '' '请不要删除该行,只在下一行中填空' For k = 2 to Fac = Fac
Private Sub Command1_Click()
Dim n As Integer
n = InputBox("请输入一个正整数:")
Print Fac(n)
End Sub
Private Function Fac(m) As Long
'' '请不要删除该行,只在下一行中填空'
For k = 2 To m
Fac = Fac * k
Next k
End Function