double funcos( double e, double x ){
int i=2,j;
int middle=1;
double result1=1;
double result2=1;
double result=0;
double sum=0;
int flag=1;
do{
result=flag*result1/result2;
result1=pow(x,i);
for(j=1;j<=n;j++){
middle*=j;
}
result2=middle;
i+=2;
flag=-flag;
sum+=result;
}while(fabs(result)>=e);
return sum;
}
请问我这个代码的问题在哪?