To determine the square root of a positive real number k, given any approximation x_{i} > 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.
Step 1
Run your program on the following three test cases:
Test Input |
---|
2 |
9.8696044010893586188344909998762 |
1000000 |
You may submit multiple times. Only your most recent submission for each task in the open round will be marked.