Question: Pi can be computed with an alternating series with the formula: 4 * (1 - 1/3 + 1/5 - 1/7 + 1/9 -1/11 + 1/13
Pi can be computed with an alternating series with the formula: 4 * (1 - 1/3 + 1/5 - 1/7 + 1/9 -1/11 + 1/13 - 1/15 + 1/17 - 1/19. Write a java program to use this series to approximate pi, carry your calculation out to 10 terms, i.e the last fraction will be 1 over 19. Make sure your signs alternate inside the parenthesis. Note use 1.0 instead of 1
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
