#include int main(){ int i,exp=1; double sum=0; for(i=1;1.0/i>=0.0001;i+=2) { sum+=1.0/i*exp; //exp调节符号 exp*=-1; } printf("%lf\n",sum); return 0;}