Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Use javaimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions