Question: The divide and average? method, an old-time method for approximating the square root of any positive number ? can be formulated as x = x
The divide and average? method, an old-time method for approximating the square root of any positive number ? can be formulated as x = x + a/x / 2.
(a) Write well-structured pseudosode to implement this algorithm as depicted in Figure. ?Use proper indentation so that the structure is clear.
(b) Develop, debug, and document a program to implement this equation in either a high-level language or a macro language of your choice. Structure your code according to Figure.

a > 0 tol = 10-5 SquareRoot = 0 %3D r= a/2 y = (r + alx)/2 e = {y - x)/yl e < to! SquareRoot = x LL
Step by Step Solution
3.53 Rating (163 Votes )
There are 3 Steps involved in it
a Pseudocode IF a 0 THEN tol 10 5 x a2 DO y x ax2 e y xy x y IF e tol ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
45-M-N-A-M-E-A (28).docx
120 KBs Word File
