Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need the program in c so that I can see how it's worked out, again please in c, not c# or c++. thanks bunches. Objective
need the program in c so that I can see how it's worked out, again please in c, not c# or c++. thanks bunches.
Objective Demonstrate use of a while) loop for an undetermined number of iterations. Background An ancient method for finding square roots turned out to be a special case of what is today called Newton's method for root finding. It's so efficient and simple that it is still frequently used in computers today. An algorithm is a step-by-step process for solving a problem. You have already developed algorithms in previous homework assignments, but they were simple enough that you essentially did them in your head as opposed to writing them down. The algorithm for finding square roots using Newton's method can be written as follows. Note that this format is commonly used in technical and scientific papers. Algorithm Square Root using Newton's method 1. function sqrt(x) Choose a small value, Choose initial value for y (e.g. Yo = 1.0) While y - xl> Yn+1 = + yn) Return y There is a similarity between the algorithm and actual code, but the algorithm is written in a way that it could be implemented in any language, so it is not specific to C. Assignment 1. Write a function to find square roots of positive numbers using the algorithm above. It should a parameter and return a double as the answer. Use a value of 0.0001 for epsilon (). a. Be sure to add #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started