//计算x-1/2*x^3/4+1/2*3/4*x^5/6-1/2*3/4*5/6*x^7/8+……的近似值,直到最后一项的绝对值小于eps # include<stdio.h> # include<math.h> # define eps 0.001 int main() { int n=2; double t,s,x; printf("请输入x的值"); scanf("%lf",&x); t=x,s=t; while(fabs(t)>eps) { t=-t*(2*n-3)*x*x/(2*n-2); s=s+t/(2*n); n++; } printf("%f\n",s); return 0; } //可以计算当x<=1时的值,但当x>1时运行就没有结果了,这是怎么回事?