計算1-1/2+1/3-1/4+...-1/100的幾種算法總結

計算1-1/2+1/3-1/4+…-1/100web int main() { //法一: double n = 1; double sub = 0; double trem = 0; double q = 1; for (n = 1; n < 101; ++n) { trem = q*(1.0 / n); s
相關文章
相關標籤/搜索