Question: Can you please write a C++ program in Codeblocks for the following problem? Thanks. 5. (Numerical analysis) Given a number, n, and an approximation for
5. (Numerical analysis) Given a number, n, and an approximation for its square root, a closer approximation of the actual square root can be found by using this formula: (n I previous approximation) + previous approximation new approximation- Using this information, write a C++ program that prompts the user for a number and an initial guess at its square root. Using this input data, your program should calculate an approximation of the square root that's accurate to 0.00001. (Hint:Stop the loop when the difference between the two approximations is less than 0.00001.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
