Question: MUST BE DONE IN JAVA Assignment : Write an algorithm, in java, and program to compute , using the formula/algorithm described in the text -

MUST BE DONE IN JAVA

Assignment: Write an algorithm, in java, and program to compute , using the formula/algorithm described in the text - refer to P1.3 on page 29.

Output: 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, labeled and easy to read for comparing results.

Input: No user input.

Requirements: Use only material covered in the first six chapters. Style requirements as discussed in class expected.

Efficiency should always be considered. Always choose the most appropriate loop/decision structures and variable types. No rounding is required or allowed.

You may NOT use the math library constant for in your computation - directly or indirectly. Use ONLY the delta (difference) of your running computation to determine when to stop your loop.

Submission: Your program must be able to compile and execute on FIU SCIS, using the java compiler.

Please name your source code file: ComputePI.java .

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!