計算從1-1/2+1/3-1/4+1/5-1/6+...-1/100=???

//計算從1-1/2+1/3-1/4+1/5-1/6+...-1/100=??? #include<stdio.h> #include<math.h> #define N 100 void main() { float number=1.0; float sum=0.0; float i=1.0; while(number<=N) { sum=sum+i/number; ++nu
相關文章
相關標籤/搜索