Question: Before starting writing your code write an algorithm. The algorithm will help you determine the sequence of instructions for each program as well as a
Before starting writing your code write an algorithm. The algorithm will help you determine the sequence of instructions for each program as well as a Label your source code: Hwk4_ P1 You will submit your source code as well as the algorithm that you developed for each program. ny special cases in the input and/or output data. 1. write a C function that will estimate the value of from the infinite series: The function should accept an integer from the user and then calculate the value of given that many terms. For example, if the user enters 4, then the program should estimate using the first four terms of the sequence, and output the final result of = 44-:-2.895238 Use the following function prototype: float estimate Plint terms); The final result is printed in the main function; the function estimate PI caleulates and returns the final result as a double precision floating point number. * Notes: You only need to output the final floating point result. Also notice that the sequence switches from adding and subtracting each term. Also be sure your program can handle the 0 case
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
