4个回答
2012-12-26
展开全部
Private Sub Command1_Click()
Dim i%
Dim s As Single
s = 0
For i = 1 To 10
s = s + 1 / compu(i)
Next i
Text1.Text = s
End Sub
Function compu(n%) As Single
compu = 1
Dim i%
For i = 1 To n
compu = compu * i
Next i
End Function
Dim i%
Dim s As Single
s = 0
For i = 1 To 10
s = s + 1 / compu(i)
Next i
Text1.Text = s
End Sub
Function compu(n%) As Single
compu = 1
Dim i%
For i = 1 To n
compu = compu * i
Next i
End Function
展开全部
Private Sub cmdclip_Click()
s = 0
For i = 1 To 10
t = 1
For j = 1 To i
t = t * j
Next j
s = s + (1 / t)
Next i
Label1.Caption = s
End Sub
s = 0
For i = 1 To 10
t = 1
For j = 1 To i
t = t * j
Next j
s = s + (1 / t)
Next i
Label1.Caption = s
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
DIm s:s=1
For I=1 to 10
s=s*i
Next
或者
For I=10 to 1 step -1
s=s*i
Next
For I=1 to 10
s=s*i
Next
或者
For I=10 to 1 step -1
s=s*i
Next
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
s=s+1/compu(i)
compu=compu*i
compu=compu*i
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询