double fn( double x, int n ){
int flag,i;
double sum=1;
if(n==1){
return x;
}
if((n-1)%2==0){
flag=1;
} else{
flag=-1;
}
for(i=0;i<n;i++){
sum*=x;
}
return fn(x,n-1)+flag*sum;
}
05-17
242
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-27
10-09