vb求∏的近似值.直到最后一项绝对值小于0.0001为止.公式:∏/4≈1-1/3+1/5-1/7+.程序中问号怎么填dim s as integer,n as integerdim t as single,pi as singles=1:t=1:n=1:pi=?do whlie asb(t) >0.0001pi=pi+?n=n+2s=-st=s/nloopprint pi*?

问题描述:

vb求∏的近似值.直到最后一项绝对值小于0.0001为止.公式:∏/4≈1-1/3+1/5-1/7+.程序中问号怎么填
dim s as integer,n as integer
dim t as single,pi as single
s=1:t=1:n=1:pi=?
do whlie asb(t) >0.0001
pi=pi+?
n=n+2
s=-s
t=s/n
loop
print pi*?