#includevoid main(){ double pi=0,sum=0,k=1; int i=1; do{ sum=sum+i/k; k=k+2; i=-i; } while(1/k>0.0001); pi=4*sum; printf("PI的值是:%f\n",pi);}vc++6.0下调试通过,pi值为3.141393