Question: Write an algorithm and program to compute , using the formula described in the text pi=(4/1)-(4/3)+(4/5)-(4/7)+(4/9)... Output will include your computed value for , the

Write an algorithm and program to compute , using the formula described in the text pi=(4/1)-(4/3)+(4/5)-(4/7)+(4/9)... Output will include your computed value for , the math library constant expected value for and the number of iterations it took to reach six-significant digit accuracy. The number of iterations could exceed 250,000. Make your output clean and easy to read for comparing results. You may NOT use the math library constant in your computation - directly or indirectly. Use the delta of your running computation to determine when to stop. Efficiency should always be considered. No rounding is required or allowed. Choose the most appropriate loop/decision structures and variable types. Input: No user input. Requirements: Use only material covered in the first six chapters. Style requirements as discussed in class expected. Submission: Include program documentation that provides clear instructions for how to compile and execute your program. im completely lost on almost everything i dont know how to calculate pi without using th emath sonstant or how to get to six significant figures using loops without rounding. i also dont know what is meant by "include documentation for how to compile and execute program". In Java please.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!