Wednesday
April 16, 2014

Homework Help: C++

Posted by maria PLEASE HELP on Friday, March 9, 2012 at 4:22pm.

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

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

Search
Members