The ancient Greeks knew how to efficiently compute square roots. If you want the square root of a and already have a guess xold for it, then you can have a better guess as the average of xold and a / xold, i.e.

xnew = (xold + a / xold) / 2

For the initial guess, set xold to a.

Implement a program that reads a, prompting the user until a positive number is entered, and that prints all guesses other than the initial one, until two of them are less than 10-12 apart.

Print the guess number in a field of width 2 and the guess in a field of width 20 with twelve digits after the decimal separator.