c语言 π/2=1+1/3*2/5+1/3*2/5*3/7+1/3*2/5*3/7*4/9+...求π精确到0.0001double n,t,sum,pi;sum=1.0;n=1.0t=1.0;do{t=t*(n/(2*n+1));sum=sum+t;}while(n/(2*n+1)

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 04:41:28
c语言 π/2=1+1/3*2/5+1/3*2/5*3/7+1/3*2/5*3/7*4/9+...求π精确到0.0001double n,t,sum,pi;sum=1.0;n=1.0t=1.0;do{t=t*(n/(2*n+1));sum=sum+t;}while(n/(2*n+1)
x)K~~ l Ma92[DR[OOƦ 7{pӎ z)I9 y:%:ť:@Py Iɯ.-z#O_H+OPNH=kXזgdjmTq # ]f A߀`_v6C*^.|g3+T)*ACXe{˹xnuӟjy~ i

c语言 π/2=1+1/3*2/5+1/3*2/5*3/7+1/3*2/5*3/7*4/9+...求π精确到0.0001double n,t,sum,pi;sum=1.0;n=1.0t=1.0;do{t=t*(n/(2*n+1));sum=sum+t;}while(n/(2*n+1)
c语言 π/2=1+1/3*2/5+1/3*2/5*3/7+1/3*2/5*3/7*4/9+...求π精确到0.0001
double n,t,sum,pi;
sum=1.0;
n=1.0
t=1.0;
do{
t=t*(n/(2*n+1));
sum=sum+t;
}
while(n/(2*n+1)

c语言 π/2=1+1/3*2/5+1/3*2/5*3/7+1/3*2/5*3/7*4/9+...求π精确到0.0001double n,t,sum,pi;sum=1.0;n=1.0t=1.0;do{t=t*(n/(2*n+1));sum=sum+t;}while(n/(2*n+1)
题目是 x/2 = .
do while 里面只是计算的等式的右端,所以乘以2才是x