#include<stdio.h> #include<math.h> void main() { double sum,term=1,x; int k=0,sign=1; printf("x:"); scanf("%lf",&x); sum=1; while(fabs(term)>1e-6) { k=k+2; term*=x*x/k/(k-1); sign=-sign; sum+=sign*term; printf("sum=%6.2lf\n",sum); } }