首页 > 其它 > 题目详情
vb求n阶乘表达式Private Sub Command1 Click()Dim n As Integern = Inp
题目内容:
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
优质解答
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
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
优质解答
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
本题链接: