Newton-Raphson Method - Algorithm
Step 1. Read the initial approximation x0, and the number of iterations 'n'.
Step 2. Define f(x), the given function and f'(x), its derivative.
Step 3. Calculate f(x0) and f'(x0).
Step 4. Calculate the next approximation x1 by using NR formula.
Step 5. For the next iteration, replace x0 by x1.
Step 6. Repeat steps 3, 4, and 5 for n iterations.
Step 7. The approximate value of the root is obtained in x1 in the last iteration.
Step 8. Display the root and stop.