Computers and Technology
Computers and Technology, 11.03.2020 00:52, gia2038

Write a C++ program that computes an approximation of pi (the mathematical constant used in many trigonometric and calculus applications) to four decimal places. A summation that can be used to compute pi is the following (from calculus). pi = 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - + (-1)ⁿ * 4/ (2n+1)Your program will compute a sequence of computations: S₀ = 4/1 S₁ = S₀ - 4/3 S₂ = S₁ + 4/5Since the above sequence So, S1, S2, ... converges to pi, we can stop when two consecutive S values differ by less than 0.00005.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, Melissamv2052
Selective incapacitation is a strategy to reduce prison population
Answers: 3
image
Computers and Technology, 23.06.2019 17:30, granta1
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, cheycheybabygirl01
How can the temperature of a room be raised by 5degreesf?
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, glitch14
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
Answers: 1
Do you know the correct answer?
Write a C++ program that computes an approximation of pi (the mathematical constant used in many tri...

Questions in other subjects: