Question: In a c++ program, apply the Babylonian Algorithm to compute thesquare root of 2. This algorithm (so called because it was used bythe ancient Babylonians)
In a c++ program, apply the Babylonian Algorithm to compute thesquare root of 2. This algorithm (so called because it was used bythe ancient Babylonians) computes square root of 2 by repeatedlyreplacing one estimate of x with the closer estimate of x = (x +(2/x))/2. Note that this is simply the average of x and 2/x.
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
float squareRootfloat n input input value2 ... View full answer
Get step-by-step solutions from verified subject matter experts
