ZOJ007 Numerical Summation of a Series(纯数学)
#include<bits/stdc++.h> using namespace std; int main() { double i; double k; for(i=0.000;i-2.000<=0.00000001;i+=0.001) { k=1; double sum=1+(1-i)/(2*10000*10000); while(k-10000<0) { sum+=(1-i)/(k*(k+i)*(k+1)); k=k+1; } printf("%5.3lf %16.12lf\n",i,sum); } return 0; }