Question: C++ please write me a code and make sure its variable and argument are easy to read becaue im new to this program. we just

5. Given a positive real number n, and an approximation for its square root, approx, a closer approximation to the actual square root, new-approx, can be obtained using the formula: new-approx=2approxn+approx Using this information, write a program that prompts the user for a positive number and an initial approximation to the square root of the number, and then approximates the actual square root of the number accurate to 0.00001. Hint: Using the initial approximation as the first value of approx, repeatedly calculate a new-approx, using the above formula, until the absolute value of the difference between the new-approx and approx is less than or equal to 0.00001. If the difference is greater than 0.00001, then calculate another new-approx, using its previous value as the value of approx. Note: The function fabs should be used to calculate the needed absolute value. To find the absolute value of a variable x, include this code: f abs (x) Note: To use this function, you need to add \#include cmath after the other include statement at the beginning of your code. Enter n: 5 Enter first approximation: 2 The square root of 5=2.23607
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
