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