vb编程2/1.3/2.5/3.8/5.13/8.....前n项之和
答案:1 悬赏:0 手机版
解决时间 2021-11-14 18:23
- 提问者网友:星軌
- 2021-11-14 13:41
vb编程2/1.3/2.5/3.8/5.13/8.....前n项之和
最佳答案
- 五星知识达人网友:忘川信使
- 2021-11-14 15:15
Private Sub Command1_Click()
n = CInt(InputBox("N=?"))
a = 2
b = 1
s = 0
For i = 1 To n
s = s + a / b
c = a + b
b = a
a = c
Next i
Print "S("; n; ")="; s
End Sub
n = CInt(InputBox("N=?"))
a = 2
b = 1
s = 0
For i = 1 To n
s = s + a / b
c = a + b
b = a
a = c
Next i
Print "S("; n; ")="; s
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯