Program that estimates the value of mathematical pi.

Hi, I need some help.

I need to write a program that estimates the value of the mathematical constant pi. The infinite
series used to approximate it is shown below. The program should calculate it up to the
'n'th term as given by the user. It should also display each 'k'th calculation as given by the
user. The first 6 elements of the series calculation are shown below.

π = 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + etc...

those are fractions by the way.


If anyone could give me a full working program for this, i'd be forever in your debt.
If anyone could give me a full working program for this
http://www.cplusplus.com/articles/how_to_ask/
And don't double post please http://www.cplusplus.com/forum/beginner/21125/
Last edited on
Topic archived. No new replies allowed.