Question: COULD STEP COMMENTS PLEASE BE ADDED, WRITE IN C NOT C++ THANK YOU!! The value of pi (r) can be estimated by the following formula

COULD STEP COMMENTS PLEASE BE ADDED,
WRITE IN C NOT C++
THANK YOU!!
The value of pi (r) can be estimated by the following formula limit Write a program that uses this formula to calculate pi. a. In functio approximation for pi. Restrict the number of terms to an integer between 25 and 75 (including 25 and 75) terms by using a while or do... while data validation loop. n main prompt the user for the number of terms limit) to be used in the b. Call a function to calculate the approximation value for pi, using the formula above. The function receives the number of terms in the approximation sum and returns the approximation. Calculate the approximation value using a for loop for the sum. Print the approximation in function main with 6 decimal digits. (Part b may be written entirely in function main with a deduction of 5 points.) c. Back in function main print a table of radius values from 2 to 20 at intervals of 2 and corresponding sphere volumes (V-4/3 using the value of pi from the approximation formula found in part b. (lf you could not get part b to work,y 3.14159 as the value of pi for this part.) Use integers for radius and doubles for volume. Place column headings above the table and print radius values in the column on the left with 0 decimal digits and volumes in the column on the right with 2 decimal digits. For ou may use 3 bonus points, use a function for this table instead of writing the commands in function main. Submit this question sheet, your cribsheet and hard copy of your program. Save your.c file to Test2 found in Canvas under Assignments have set ve 3 funek statemad there is a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
