Question: Modify the program so that the value of epsilon is passes as an argument to the function. #include 5 float absolutevalue (float x) if (x

Modify the program so that the value of epsilon is passes as an argument to the function.

Modify the program so that the value of epsilon is passes as

#include 5 float absolutevalue (float x) if (x 0) return (x); 2 float squareroot (float x) const float epsilon = 0.00001; float guess = 1.0; while (absolutevalue ( guess * guess -x)>= epsilon) guess = (x/ guess + guess)/ 2.0; return guess; 2 int main (void) printf("squareroot printf("squareroot printf("squareroot (2.0) %f ", squareroot (2.0)); (144.0) = %f ", squareroot (144.0)); (17.5) -%f ", squareroot (17.5)); return 0

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 Databases Questions!