Square root by hand

From Rosetta Code
Revision as of 22:01, 10 October 2020 by rosettacode>Shannonbowling (Calculate each digit of square root of a number.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Create a program that will calculate n digits of the square root of a number.

The program should continue forever (or until the number of digits is specified) calculating and outputting each decimal digit in succession. The program should be a "spigot algorithm" generating the digits of the number sequentially from left to right providing increasing precision as the algorithm proceeds.