#include<stdio.h>
int main(){
int m=1;
double d=2.0,s=1.0,t;
while(d<=100){
m=-m;
t=m/d;
s=s+t;
d=d+1;
}
printf("%f\n",s);
return 0;
}
求1-1/2+1/3-1/4+...+1/99-1/100
猜你喜欢
转载自blog.csdn.net/weixin_43370629/article/details/88745416
今日推荐
周排行