Question: Write a program that computes the square root of a number using the following iterative algorithm ( not using any in - built function )

Write a program that computes the square root of a number using the following iterative algorithm (not using any in-built function).
Given a number a, where a =27,compute the subsequent guesses of the square root using the following iterative
formula:
xi+1=12(xi+axi)
That is, you use ith guess to compute the (i+1)th guess. Stop when the two guesses are within
10-6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!