RosettaCodeData/Task/Nth-root/AWK/nth-root-3.awk

9 lines
88 B
Awk
Raw Permalink Normal View History

2025-02-27 18:35:13 -05:00
{
x = $0
do {
y = x
x = (x + $0/x)/2
} while (x < y)
print "sqrt(" a ")=" x
}