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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 19:17:46
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

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