求s=1-1⼀2+1⼀3-1⼀4+.+1⼀99-1⼀100的值用vb程序编写

2025-02-23 23:50:33
推荐回答(1个)
回答1:

Dim s,n ,i as Integer
for i=1 to 100
n=(-1)^(i+1) /i
s=s+n
next i
print s