Saturday

January 31, 2015

January 31, 2015

Posted by **Emre** on Sunday, November 11, 2012 at 10:44am.

(n!)/(2n+1)! (from n=1 to infinity)

Within the MAIN function:

. Read a variable EPSILON of type DOUBLE (desired accuracy) from

the standard input.

EPSILON is an extremely small positive number which can be anything

between 1E-06 (10^(-6)) and 1E-12 (10^(-12)).

. EPSILON value will be passed to the FUNCTION as an argument.

Within the FUNCTION:

. In a do-while loop:

. Continue adding up the terms until |Sn+1 - Sn| < EPSILON.

. Sn is the sum of the first n-terms.

. Sn+1 is the sum of the first (n+1)-terms.

When the desired accuracy EPSILON is reached print the SUM and the number

of TERMS added to the sum.

- C++ -
**Emre**, Sunday, November 11, 2012 at 12:46pmThanks for now

**Answer this Question**

**Related Questions**

C++ - Write a MAIN function and a FUNCTION to compute the sum of the below ...

C++ - Write a MAIN function and a FUNCTION to compute the sum of the below ...

C++ - you are right the question is exactly like this... can you help me for ...

calculus - Recall that a function G(x) has the limit L as x tends to infinity, ...

Taylor seires - f(x) =ln (1-x) a) Compute f'(x), f''(x), f'''(x). Spot the ...

calculus - Recall that a function G(x) has the limit L as x tends to infinity, ...

Piecewise function - write a piece-wise function over 3 intervals whose domain ...

pre calc - The Identity Function The Squaring Function The Cubing Function The ...

Python programming - A standard problem in mathematics is to measure the area ...

Calculus - For what values of p>0 does the series Riemann Sum [n=1 to ...