计算1/(1*2)+1/(2*3)+1/(3*4)vb编程代码啊啊啊1/(1*2)+1/(2*3)+1/(3*4)+...+1/(N*(N+1))

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 23:47:26
计算1/(1*2)+1/(2*3)+1/(3*4)vb编程代码啊啊啊1/(1*2)+1/(2*3)+1/(3*4)+...+1/(N*(N+1))计算1/(1*2)+1/(2*3)+1/(3*4)vb

计算1/(1*2)+1/(2*3)+1/(3*4)vb编程代码啊啊啊1/(1*2)+1/(2*3)+1/(3*4)+...+1/(N*(N+1))
计算1/(1*2)+1/(2*3)+1/(3*4)vb编程代码啊啊啊
1/(1*2)+1/(2*3)+1/(3*4)+...+1/(N*(N+1))

计算1/(1*2)+1/(2*3)+1/(3*4)vb编程代码啊啊啊1/(1*2)+1/(2*3)+1/(3*4)+...+1/(N*(N+1))
Private Sub Command1_Click()
Dim n As Double
n = Val(InputBox("N="))
For i = 1 To n
s = s + 1 / (n * (n + 1))
Next i
MsgBox "所求的和为:" & s
End Sub