```c #include <stdio.h> #include <math.h> int main() { double pi = 0.0; double term = 1.0; int i = 0; const double epsilon = 1e-7; while (fabs(term) > epsilon) { pi += term; term = -term * (i + 2) / (i + 3); i += 2; } pi *= 4; printf("pi = %.10f\n", pi); return 0; } ``` [2024-10-01 17:35:36 | 讯飞-星火认知 | 152字解答]