VB编程:求和Sn=1!+3!+5!+…+19!。
答案:1 悬赏:20 手机版
解决时间 2021-01-10 05:23
- 提问者网友:城市野鹿
- 2021-01-09 08:27
VB编程:求和Sn=1!+3!+5!+…+19!。
最佳答案
- 五星知识达人网友:行路难
- 2021-01-09 08:34
Private Sub Command1_Click()
Dim Sn As Double
Dim i As Integer, j As Integer
Dim temp As Double
temp = 1
For i = 1 To 19 Step 2
For j = 1 To i
temp = temp * j
Next
Sn = Sn + temp
temp = 1
Next
MsgBox Sn
End Sub
Dim Sn As Double
Dim i As Integer, j As Integer
Dim temp As Double
temp = 1
For i = 1 To 19 Step 2
For j = 1 To i
temp = temp * j
Next
Sn = Sn + temp
temp = 1
Next
MsgBox Sn
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯