Pythagorean triples: Difference between revisions

Content added Content deleted
(Added Algol 68)
Line 383: Line 383:


=={{header|ALGOL 68}}==
=={{header|ALGOL 68}}==
Uses a table of square roots so OK for perimeters up to 1000 (or possibly 10 000), for larger perimeters, binary searching a table of squares to find the root would probably be better...
Uses a table of square roots so OK for perimeters up to 1000 (or possibly 10 000).
<syntaxhighlight lang="algol68">
<syntaxhighlight lang="algol68">
BEGIN # find some Pythagorean triples ( a, b, c ) #
BEGIN # find some Pythagorean triples ( a, b, c ) #