填空题

给定程序中,函数fun()的功能是计算下式



直到
,并把计算结果作为函数值返回。
例如,若形参e的值为1e-3,函数的返回值为2.985678。
#include<stdio.h>
double fun(double e)
int i;double s,x;
/**********found**********/
s=0;i= (1) ;
x=1.0;
while(x>e)
/**********found**********/
(2) ;
/**********found**********/
x=(2.0*i-1)/( (3) *(2.0*i));
s=s+x;

return s;

main()
double e=1e-3;
printf("\nThe result is:%f\n",fun(e));

【参考答案】

(1)0 (2)i++ (3)2.0*i