[Solved] Formula nested in loop won’t execute properly
First of all, make n and p integers. Secondly n starts at 3 doesn’t it? Third the Pi series is 4.0 (- fraction + fraction)… Finally you can printf using %.*lf to increase/limit the precision of the output. if ( 2 == route ) { printf(“piseries calculator\n”); double pi=4.0; int n,p; printf(“define precision”); scanf(“%d”,&p); for(n=3;n<p;n+=2) … Read more