Question: Write a C++ program that sums a user-dened number of terms, n, in this series 1 1/2 + 1/3 1/4 + 1/5 ... which is
Write a C++ program that sums a user-dened number of terms, n, in this series 1 1/2 + 1/3 1/4 + 1/5 ... which is an approximation of ln(2).
Use a function, with the prototype: double computeNatLog2 (int);
You should report both your estimate for ln(2) and the actual value along with the dierence between the two. How many terms do you need in the sum to get to a tolerance of 1106? Your function should make use of a: use for loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
