程序执行没有结果
#include<stdio.h>#include<math.h>
main()
{
double sum = 1.0, deno = 1.0;
int sign = 1;
double pi;
while( fabs(sum) >= 1e-6 )
{
sign = (-1) * sign;
deno = deno + 2;
sum = sum + sign / deno;
}
pi = 4 * sum;
printf("%f\n",pi);
}
请问哪错了,没有结果