it works my calculation works fine but when i run the program it doesnt come close to the value of pi which is 3.14 sumthing only up to 2.7 sumthing..
am i doing the calculation wrong?
i did......
Type: Posts; User: gonfreecks
it works my calculation works fine but when i run the program it doesnt come close to the value of pi which is 3.14 sumthing only up to 2.7 sumthing..
am i doing the calculation wrong?
i did......
double denom = 3;
double pi;
double x = -1;
int i;
double pi2 =0;
double denom2 = 0;
double pi3 = 0;
pi = 4*(1-((double)1/denom));
pi2 = pi;