Question: Use java Using the following series: pi = 4(1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + + (-1)^i + 1/2i -

Use javaUse java Using the following series: pi = 4(1 - 1/3 +

Using the following series: pi = 4(1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + + (-1)^i + 1/2i - 1) Approximate PI for i = 10000, 20000, 30000, ..., 100000 Requirement: You can only use 1 loop to solve this problem. Sample Output: when i == 10000, PI = 3.1414926535900345 when i == 20000, PI = 3.1415426535898248 when i == 30000, PI = 3.141559320256462 when i == 40000, PI = 3.1415676535897985 when i == 50000, PI = 3.1415726535897814 when i == 60000, PI = 3.141575986923102 when i == 70000, PI = 3.141578367875482 when i == 80000, PI = 3.1415801535897496 when i == 90000, PI = 3.1415815424786238 when i == 100000, PI = 3.1415826535897198

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!