一道C语言题,计算1 + 1/1!+1/2!+1/3!+...+1/n!.帮忙改下程序#include #include int main(void){int i = 1; double p = 1,fac = 0;do{ p = p * i;fac = fac + 1 / p;i++;} while ((1 / fac) > 0.00001);printf("e = %lf",fac + 1);return 0;}
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 00:23:41
x){edXr>_7PA[PPQPD+jyzOw{);~~̼ҔT8#3D!713O,?3ETU0VH/MIU( tuJ~5X@AK!"
"PW(ֶU( e5PӺhGR*PjNTuQjIiQВZ"}xlܳXxU%!c
DD"t\ '0`ALb`ixA̳/eDrm^/{Ȋ<;P ŕb2