Tuesday

March 3, 2015

March 3, 2015

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

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.

- C++ -
**MathMate**, Thursday, March 15, 2012 at 8:37pmYour teacher's instruction ressemble very much a pseudocode. Just transcribe and start coding.

Can you propose a pseudocode, or actual coding so that we have a starting point?

- C++ -
**MATHMATE PLEASEE HELP**, Friday, March 16, 2012 at 1:03pmsir. ý don't understand anything.. ý need answer in c program. and the program should to run...

- C++ -
**MathMate**, Friday, March 16, 2012 at 10:10pmHere's a sample C-code template for you to start with.

C++ would be slightly different

You just have to add in your own code.

If you have no idea where to start, review your teacher's notes, or do the best you can.

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main()

{

printf("Hello World!\n");

}

- C++ -
**MATHMATE PLEASEE HELP**, Saturday, March 17, 2012 at 7:05amý am sorry but. you can't do all this question??? I DONT KNOW THÝS PROGRAM... :S:S

- C++ -
**MathMate**, Saturday, March 17, 2012 at 8:04pmI have done this whole program. I have even showed you the results of the (wrong) series to show that the question was wrong.

However, I am sorry that I*should not*post my program. I can help you get there, to make sure it works, if you show efforts on your part. Your teacher gave you this assignment so that you can learn. If you take my program ans submit as your own work, it would be plagiary, and worse, you haven't learned anything.

If you want to achieve anything close to writing a program, there is no other way than to write it and learn from mistakes. This is why compilers are there to check your program for obvious mistakes. We're here to help you if you cannot figure out the mistakes.

**Answer this Question**

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