#include stdioh#include mathhint Facint n ifn == 1 return 1; else return n Facn-1;int main float a = 10; float b = 1; float c = 1; float sum = 1; int n ; scanfd&n; while fa
#include "stdio.h" #include "math.h"
int Fac(int n){ if(n == 0) return 1; else return n * Fac(n-1); }
int main(){ float e = 1.0; float c = 1.0; int n = 1; while (c >= 1e-6){ c = 1.0 / Fac(n); e += c; n++; } printf("%f",e); return 0; }
原文地址: https://www.cveoy.top/t/topic/d6St 著作权归作者所有。请勿转载和采集!