C++

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

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

  1. 👍 0
  2. 👎 0
  3. 👁 42
asked by Emre
  1. Thanks for now

    1. 👍 0
    2. 👎 0
    posted by Emre

Respond to this Question

First Name

Your Response

Similar Questions

  1. C++

    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

    asked by maria PLEASE HELP on March 9, 2012
  2. C++

    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

    asked by maria PLEASE HELP on March 9, 2012
  3. C++

    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

    asked by MATHMATE PLEASEE HELP on March 15, 2012
  4. algebra

    Okay, I was taught that if a geometric series is infinite and it diverges then it has no limit and no sum. Looking back in my notes, I found an example of finding the value for a divergent series? Is this possible? The sum of an

    asked by Jane E. on May 31, 2007
  5. Taylor seires

    f(x) =ln (1-x) a) Compute f'(x), f''(x), f'''(x). Spot the pattern and give an expression for f ^(n) (x) [the n-th derivative of f(x)] b) Compute the MacLaurin series of f(x) (i.e. the Taylor series of f(x) around x=0) c) Compute

    asked by Jill on November 26, 2006
  6. calc help

    consider the function f(x)= x^2/4 -6 Rn is the Riemann sum where the sample points are chosen to be the right-hand endpoints of each sub-interval. Calculate Rn for f(x)= x^2/4 -6 on the interval [0,4] and write your answer as a

    asked by amanda on November 28, 2006
  7. computer programming

    write a program to print fibonaaci series like 2,1,3,4,7,11,18 up to 10th term using function...end function I did it using SUB..end sub in this way : declare sub series cls call series end sub series a=2 b=1 for p =1 to 5 print

    asked by JILL on January 1, 2016
  8. Pre Cal

    a function f is defined as f(x)= square root of (x+4). a) identify the domain of the function b) identify the range of the function c)Compute the intercept d) compute the x intercept E) sketch a graph of the function

    asked by Ashley on July 24, 2011
  9. Programming

    Write a function that takes one positive integer value (call it n) as a parameter and produces the sum of the integers between 1 and n. Hint: The sum of the integers from 1 to n is n*(n+1) all over 2 I know this is how the

    asked by Annabelle on April 29, 2014
  10. pre calc

    The Identity Function The Squaring Function The Cubing Function The Reciprocal Function The Square Root Function The Exponential Functional Lo The Natural Logarithum Function The Sine Function The Cosine Function The Absolute

    asked by kim on December 18, 2009

More Similar Questions