VB编程计算s=1+1/2+1/4+1/7+1/11+1/16+1/22+1/29+...,当第i项的值<10的-4次方时结束十分感谢啦!,很着急,谢谢帮忙啊~~

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 13:41:37

VB编程计算s=1+1/2+1/4+1/7+1/11+1/16+1/22+1/29+...,当第i项的值<10的-4次方时结束十分感谢啦!,很着急,谢谢帮忙啊~~
VB编程计算s=1+1/2+1/4+1/7+1/11+1/16+1/22+1/29+...,当第i项的值<10的-4次方时结束
十分感谢啦!,很着急,谢谢帮忙啊~~

VB编程计算s=1+1/2+1/4+1/7+1/11+1/16+1/22+1/29+...,当第i项的值<10的-4次方时结束十分感谢啦!,很着急,谢谢帮忙啊~~
Private Sub Command1_Click()
'10^(-4)=1/10000
For i = 1 To 9999 Step 3
a = 1 / i
Sum = Sum + a
Next i
Print Sum
End Sub