Question: 1)Select a positive number x 0 as a guess for the answer. 2)Compute as our new guess. 3)Until satisfied, replace x 0 by x 1

1)Select a positive number x 0 as a guess for the answer.

2)Compute 1)Select a positive number x 0 as a guess for the answer. as our new guess.

3)Until satisfied, replace x 0 by x 1 and repeat step 2.

Write a C++ program that uses the iteration process above to approximate the square root of a positive number a. The value of a will be entered from the console, as well as a tolerance ?. Iteration will continue until |x?-x?|, when the program will terminate. The value of x? at that point will be declared the appropriate approximation. And in the output file include the steps of the process, e. g., 1,2,3,, as well as the approximation at that step.

The output file should be able to show the approximation of square root after each loop through the formula.

Thanks in advance for the help

XO + ro X1 =

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!