Coprime triplets: Difference between revisions
→{{header|ALGOL 68}}: Tweak
(Added Go) |
(→{{header|ALGOL 68}}: Tweak) |
||
Line 13:
# iterative Greatest Common Divisor routine, returns the gcd of m and n #
PROC gcd = ( INT m, n )INT:
INT a := ABS m, b := ABS n;
WHILE b /= 0 DO
Line 23 ⟶ 21:
OD;
a
# returns an array of the coprime triplets up to n #
OP COPRIMETRIPLETS = ( INT n )[]INT:
|