The “divide and average” method, an old-time method for approximating the square root of any positive number a can be formulated as
(a) Write well-structured pseudocode to implement this algorithm as depicted in Fig. P2.7. 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 Fig. P2.7.
FIGURE P2.7
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Package: Numerical Methods For Engineers With 2 Semester Connect Access Card
Additional Math Textbook Solutions
Basic Technical Mathematics
Advanced Engineering Mathematics
Fundamentals of Differential Equations (9th Edition)
Differential Equations and Linear Algebra (4th Edition)
Precalculus Enhanced with Graphing Utilities (7th Edition)
- Elements Of Modern AlgebraAlgebraISBN:9781285463230Author:Gilbert, Linda, JimmiePublisher:Cengage Learning,Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning