以下是使用 C 语言解决此问题的代码: ```c #include <stdio.h> int main() { double e = 1.0; double term = 1.0; int n = 1; int factorial = 1; while (term >= 1e-5) { factorial *= n; term = 1.0 / factorial; e += term; n++; } printf("%f,%d\n", e, n - 1); return 0; } ``` [2024-09-29 10:46:39 | AI写代码神器 | 134点数解答]