Razan A.

asked • 11/23/18

covert algorithm to code java

INPUT initial approximation p0; tolerance TOL; maximum number of iterations N0.

OUTPUT approximate solution p or message of failure.

Step 1 Set i = 1.

Step 2 While i ≤ N0 do Steps 3–6.

Step 3 Set p = p0 − f ( p0)/f



( p0). (Compute pi.)

Step 4 If | p − p0| < TOL then

OUTPUT (p); (The procedure was successful.)

STOP.

Step 5 Set i = i + 1.

Step 6 Set p0 = p. (Update p0.)

Step 7 OUTPUT (‘The method failed after N0 iterations, N0 =’, N0);

(The procedure was unsuccessful.)

STOP.

1 Expert Answer

By:

Christopher D. answered • 12/28/18

Tutor
4.9 (383)

Computer Programmer and Educator

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.