标签:style blog color io for sp div c on
简单入门题。按照题目给的指导编程,算多少数要理解题意。
1 #include <stdio.h> 2 3 int main(){ 4 int k; 5 double x,psix; 6 for(x=0;x<=2.000;x+=0.001){ 7 psix=0; 8 for(k=1;k<10000;k++) 9 psix += 1.0 / (k*(k+1)*(k+x)); 10 psix = psix*(1-x) + (1-x)/(2*10000*10000) + 1.0; 11 printf("%5.3f %16.12f\n",x,psix); 12 } 13 return 0; 14 }
1007 Numerical Summation of a Series
标签:style blog color io for sp div c on
原文地址:http://www.cnblogs.com/ycaxgjd/p/4008721.html