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 01:30
What β€œold fashioned” features of checking accounts is p2p replacing
Answers: 3
question
Computers and Technology, 22.06.2019 09:50
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
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, 23.08.2020 01:01
question
Mathematics, 23.08.2020 01:01
question
Advanced Placement (AP), 23.08.2020 01:01
question
Mathematics, 23.08.2020 01:01
Questions on the website: 13722367