I am trying to write a summation to aprox. pi.
I am using a for loop and I cannot figure out where I am messing it up.
I keep getting "program has exited with code 0"
for(int N = 0; N <= 15; N++)
{double x9 = 0.0;
for(int n = 0; n <= N; n++)
{ x9 = x9 + pow(double(-1), n)*(4/(2*n +1));
cout<<x9<<endl;
this is my little bit of code where I cant figure it out. I looked and looked around and could not find any info on where i may have a problem. Any help would be appreciated. Thanks