Question: CIT239 Java Programming Lab Exercise 5a Approximate Due Date You must demonstrate the solution to this lab exercise to the instructor by Sunday, February 12,2017,

CIT239 Java Programming Lab Exercise 5a Approximate Due Date You must demonstrate the solution to this lab exercise to the instructor by Sunday, February 12,2017, in order to receive credit for this work. Lab Exercise 5a: Approximate TC In this exercise you are to write a simple Java program to calculate an approximate value for the mathematical constant TT. S is programming exercise 5.25 from the Liang textbook.) This lab exercise is also an opportunity to practice precise control over the output fom your program. Infinite Series to calculate an approximate value for Tu An approximate value for the mathematical constant Tt can be calculated by the following infinite series: (sign) 3 5 7 9 11 where (sign) alternates between the values of +1 and -1. The value i is a count of the terms in the series, starting at one. onMULA Initial Programming Exercise 1. Write a program that prompts the user for a MAXIMUM value for i (loopMax). 2. Calculate the approximate value of TT for i 1, 2, 3 loopMax. 3. Debug your code for a small value like loopMax 10 Hint: Use a double variable called piover4, and calculate an approximation of piover4, using the following infinite series: 1 1 1 (sign) piover4 3 5 7 9 11 CIT239-SU Lab05a 20170205 docx 2/4/2017 6:23 PM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
