Computers and Technology

Write a program that calculates pi using the Nilakantha Series. The program should accept a threshold from standard in indicating how close to pi one should calculate. The program should output for each term in the series: the result of the calculation of pi so far (fixed notation and 6 significant figures) and the different between the aproximation and actual pi (scientific notation and 2 significant figures). Once the difference is less than the threshold, cease the program.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:10, djs1671
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
image
Computers and Technology, 24.06.2019 10:10, juliana0122
Scanning the road can be thought of as a
Answers: 2
image
Computers and Technology, 24.06.2019 14:00, makaylahunt
Text or graphics that print at the bottom of every page are called footings footers headers headings
Answers: 1
image
Computers and Technology, 24.06.2019 21:40, jose4197
Clunker motors inc. is recalling all vehicles in its extravagant line from model years 1999—2002 as well as all vehicles in its guzzler line from model years 2004—2007. a boolean variable named recalled has been declared. given a variable modelyear and a string modelname, write a statement that assigns true to recalled if the values of modelyear and modelname match the recall details and assigns false otherwise.
Answers: 2
Do you know the correct answer?
Write a program that calculates pi using the Nilakantha Series. The program should accept a threshol...

Questions in other subjects: