subject

The value of Ο€ can be approximated by using the following series: the following program uses this series to find the approximate value of Ο€. however, the statements are in the incorrect order, and there is also a bug in this program. rearrange the statements and also find and remove the bug so that this program can be used to approximate Ο€. #include #include using namespace std; int main () { double pi = 0; long i; long n; cin > > n; cout < < "enter the value of n: "; cout < < endl; if (i % 2 == 0) pi = pi + (1 / (2 * i + 1)); else pi = pi ? (1 / (2 * i + 1)); for (i = 0; i < n; i++) { pi = 0; pi = 4 * pi; } cout < < endl < < "pi = " < < pi < < endl; return 0; }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:20
The kurt vonnegut commencement speech, the neiman-marcus chocolate chip cookie recipe, and the get-well emails to the dying boy are examples of select one: a. social engineering b. hoax emails c. email viruses d. worms
Answers: 1
question
Computers and Technology, 24.06.2019 18:10
Most information security incidents will occur because of select one: a. users who do not follow secure computing practices and procedures b. increases in hacker skills and capabilities c. poorly designed network protection software d. increasing sophistication of computer viruses and worms
Answers: 1
question
Computers and Technology, 24.06.2019 22:00
Aobject is used for displaying the results of a question based on stored data. a. query b. report c. table d. form
Answers: 2
question
Computers and Technology, 24.06.2019 22:10
In command prompt, whats a command that will list only .ini files in c: \windows\system32 directory?
Answers: 1
You know the right answer?
The value of Ο€ can be approximated by using the following series: the following program uses this s...
Questions
question
Mathematics, 05.10.2020 15:01
question
Business, 05.10.2020 15:01
question
Chemistry, 05.10.2020 15:01
question
Spanish, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
Questions on the website: 13722363