I have to implement a simple infinite sum which estimates the value of PI. The more iterations of the infinite sum, the more accurate the value of PI. Using the equation PI=4x(1-1/3+1/5-1/7+1/9-1/11+1/13-....)
.The details of the program are as follows:
1. The program must have a small menu for the purpose of user
interaction. The menu will contain the following choices:
1. Exit the program
2. Set how many digits past the decimal point are to be calculated
3. Calculate the value of Pi
(this part works for me)
2. I have to figure out how to determine when a digit is valid. (probably
by converting the floating point value of PI to a string and
checking for how many iterations the value of a digit is
unchanged.) Any valid algorithm to determine a valid digit is fine;
here is my code so far