当前位置: > VB表达式:计算S=1+1/2+1/4+1/7+1/11+1/16+1/22+1/29+···当第i项的值...
题目
VB表达式:计算S=1+1/2+1/4+1/7+1/11+1/16+1/22+1/29+···当第i项的值

提问时间:2020-07-27

答案
Private Sub Command1_Click()
Dim i As Long
Dim a As Double
Dim s As Double
Dim stp As Integer
stp = 1
i = 1
Do While True
If 1 / i < 10 ^ -4 Then Exit Do
a = 1 / i
s = s + a
i = i + stp
stp = stp + 1
Loop
Print s
End Sub
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.