Saturday

April 19, 2014

April 19, 2014

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

**Related Questions**

Pre Cal - a function f is defined as f(x)= square root of (x+4). a) identify the...

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 ...

trig - 1. Write a sinusoidal function for the function with a period of 6. The ...

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

math - (a) In order to express the function y = 1010 x + 4, as a composition of ...

Calculus - In order to express the function y=12^19x+7 as a composition of two ...

math - #1 If v=(6-(r^3/3))h and h/(2-r)=5/2 write V as a function of h . ...

C++ programming computer - I'm having some trouble trying to program these ...