float fun(int m){ float y; int i,j,s; if(m%2 != 0 || m<2) //不是偶数 { printf("Input Error!\n"); return -1; } for(y=0,i=2;i<=m;i+=2) { s=1; for(j=1;j<=i;j++) //求n! { s*=j; } y+=1.0/s; } return y;}