一道简单的编程题,不知道哪里错了,请各位帮帮帮帮忙
小妹刚学C语言没几天,今编一程序却运行不出来,求教:#include<stdio.h>
void main()
{
int sign;
float n,pi,term;
sign=1;
n=1.0;
pi=0;
term=1;
while(1/(2*n-1)>=1e-6)
{
pi=pi+term;
sign=(-1)*sign;
term=sign/2*n-1;
}
pi=4*pi;
printf("pi=%f\n",pi);
}