Thursday
April 24, 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

math - there are balls of colors red, blue and green. 65 students of a class ...
Chem Question? - I answered this question already, but would like you to check ...
Math - I am not exactly sure of what I'm supposed to do in the following ...
ADVANCED AMC8 GEOMETRY QUESTION/MATH - In a chess variant, a "lord" can move one...
Chemistry College Level - Ok, so here's my question: If exactly 14.563 grams of ...
english - for my extended essay i need help reword a question. right now it ...
English - What do you like? I like cartoons. How do you like? (Can we use this ...
grade 9 GEOGRAPHY - I posted a question earlier about the sensitive tourist I am...
Statistics - A total of 16 mice are sent down a maze, one by one. From previous ...
statistics - Can some one please help with this question? Find the probability ...

Search
Members