USING C++ the square root of a number N can be approximated by repeated calculation using the formula NG=.5(LG+N/LG) where NG stands for next guess and LG stands for last guess. Write a function that implements this computation. Thefirst parameter will be a positive real number, the second will be an intial guess of the square root of that number, and the third will be the computed result. the intial guess will be the starting value of LG. the function will compute a value for NG using the formula above. To control the computation, we can use a while loop. Each time through the loop , the difference between NG and LG is checked to see whether these two guesses are almost identical. If so, the function returns NG as the square root; otherwise, the next guess(NG) becomes the last guess (LG) and the process is repeated (that is, another value is computer for NG, the difference is checked, and so forth) for this problem the loop should be repeated until the magnitude of the difference between LG and NG is less than 0.005.