#include<iostream>
#include<cmath>
using namespace std;
int main()
{
double pi=0.0,a=1.0,b=1.0,c=1.0;
while(fabs(c)>1e-6){
pi+=c;
a=-a;
b+=2.0;
c=a/b;
}
pi=4.0f*pi;
cout<<"pi="<<pi<<endl;
return 0;
}
07-09
6991