#include<stdio.h>
int main()
{
int sign=1;
int n=1,term=1.0;
double sum=0.0;
while(n<=100)
sum+=term;
n=n+2;
sign=-sign;
term=sign/n;
}
printf("sum=%lf\n",sum);
return 0;
KanoWill
相关分类