有关用C语言阶乘的问题

昨天见到一道题:1+1/1!+1/2!+......+n
N是不小于10的-6次方的数

#include <stdio.h>

int main()
{
double a=1,b=0,c=1,e=0;
while (b>=1e-6)
{
    c=c*a;
    a=a+1;
    b=1/c;
    e=e+b;
} 
printf("%f\n",e);
return 0;

}
但结果却是:0.000000
到底是哪里错了??
希望得到大家指点!

#include

int main()
{
double a=1,,c=1,e=0;
while ((1/c)>=1e-6)
{
c=c*a;
a=a+1;
e=e+1/c;
}
printf("%f\n",e);
return 0;
}
B完全不需要,“(1/c>=1e-6)”“1/c”外要加“()”

while(b>1e-6)从一开始就不成立,b=0,1e-6>0,根本不会进入循环,把b初始化为1就对了

b>=1e-6刚开始就不成立 进入不到循环。。