求vb 2!+4!+6!+8!+10!的阶乘

我要代码、我已经做好界面了、答案显示在label2里
2024-12-25 07:34:27
推荐回答(4个)
回答1:

'阶乘函数
Function jc(TmpNum As Integer)
Dim i As Integer
jc = 1
For i = 1 To TmpNum
jc = jc * i
Next i
End Function
有字数限制,发信息给你了

回答2:

Private Sub Command1_Click()
Dim s#, i%, f#, j%
For i = 2 To 10 Step 2
f = 1
For j = 1 To i
f = f * j
Next j
s = s + f
Next i
Label1.Caption = "结果为:" & s
End Sub

回答3:

vv

回答4:

黑风洞滚滚滚滚滚滚滚滚滚滚滚滚滚滚滚滚滚滚滚