Thursday
November 27, 2014

Homework Help: C++

Posted by MATHMATE PLEASEE HELP on Thursday, March 15, 2012 at 1:51pm.

you are right the question is exactly like this... can you help me for this question.... thanks


Write a MAIN function and a FUNCTION to compute the sum of the below series.

((-1)^(n+1)*n!)/(n^n) (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.

Answer this Question

First Name:
School Subject:
Answer:

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++ - Write a MAIN function and a FUNCTION to compute the sum of the below ...
Math - Hi. The question I'm having problems with: Write the body of an iterative...
Math - How would you rewrite the equation y = 3x+1 as a function of x. Hmmm. It ...
math - Your friend runs up to you, scared that he is not ready for the upcoming...
PreCalculus - Write an equation to construct a function whose graph is like ...
Calculus (Continuity and Differentiability) - Okay. So I am given a graph of a ...
Pre Cal - a function f is defined as f(x)= square root of (x+4). a) identify the...
math help!!! - stuck!! pls help/explain!!! 2. Do the values in the table ...

Search
Members