编写VB程序,计算数列的和。 S=1⼀2+3⼀5+5⼀8+……+99⼀149 答案:回答(填写答案时,保留二位小数)

如题!!!急求!!!只有答案也行!!!
2024-11-27 01:32:00
推荐回答(2个)
回答1:

Dim i As Integer, j As Integer, m As Single

j = 2: m = 0
For i = 1 To 99 Step 2
m = m + i / j
j = j + 3
Next
m=int(100*m+0.5)/100
MsgBox m

答案:32.75

回答2: