Task 0The first consumer calculators provided four arithmetic operators and square root, the latter using an iterative algorithm based on the Newton-Raphson method for finding roots of equations.
To determine the square root of a positive real number k, given any approximation xi > 0 calculate
Write a program that calculates the square root of a number read from input. The initial approximation can be 1 or k, as the algorithm converges quite quickly.
Run your program on the following three test cases:
You may submit multiple times. Only your most recent submission for each task in the open round will be marked.