Question: part 1 part 2 Pi Approximation Pi is a mathematical quantity that associates the area of a circle to its radius. Write a program that

part 1

part 1 part 2 Pi Approximation Pi is a mathematical quantity that

part 2

associates the area of a circle to its radius. Write a program

Pi Approximation Pi is a mathematical quantity that associates the area of a circle to its radius. Write a program that approximates the value of pi by using the Leibniz formula: 3 5 79 Since this formula is an infinite series, you will need to prompt the user for how accurate they want the calculation to be. Rather than using one big pile of main(), you need to use functions for this calculation and pass parameters and work with return values. . In addition, you need to include at least one const int or canst double declaration Finally, embed your program in a loop so that the calculation can be repeated as often as the user wishes. Round to five decimal places. You can use Wolfram's implementation (http://www.wolframalpha.com/widgets/view.jsp?id-545e91al4706478dc240764245cd4 bd1) as a reference to check your tool's results. Iterations: 1 Pi is approximated to be 4.00000 Iterations: 2 Pi is approximated to be 2.66667 Iterations: 10 Pi is approximated to be 3.04184 . Write a program which produces this output as the examples above: Iterations: (USER INPUT) Pi is approximated to be (approximation rounded to 5th decimal place) . You are provided the flexibility to create your own files. . While there will likely be multiple methods, the main method must be named getRi(...) as a simple interface to a user. ed Statesl

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!