Question: heres a sample output I need the CORRECT code for this program and also If you can answer the questions in couple of sentences that

heres a sample output

I need the CORRECT code for this program and also If you can answer the questions in couple of sentences that would be great. I'm attaching the sample code with it. Thank You.
Description: Write a C program that calculates the approximate value of from the following three infinite series: 9 11 3 12 1 4 9 16 25 36 (12) 1/2 1 3 3 5 32 7 33 A sample interaction and output of the program is given on a separate page. Your program should prompt the user for a non-negative integer and check its validity. If the input is a negative integer, the program should display a message and prompt the user to input a non-negative integer again. All inputs are assumed to be of type integer. If the non-negative integer is zero, the program should terminate, otherwise it should output an approximate value of using the given series and prompt the user again. When writing the program, do not use the formula for the given series, simply write code that will alternately add or subtract a term to/from the series. After completing and testing your program, answer the following questions and write your answer as comment at the end of your program. Questions: How many terms of the above series do you have to use before you first get 3.14?, 3.141?, 3.1415?, or 3.14159? Make a table when answering this question. Each row should correspond to each given series and each column should correspond to the above given approximation. (b) Which series converges faster? Briefly explain
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
