Special pythagorean triplet: Difference between revisions
→{{header|Raku}}: return the product as well
m (→{{header|ALGOL 68}}: Remove test for solution found) |
Thundergnat (talk | contribs) (→{{header|Raku}}: return the product as well) |
||
Line 278:
my $c = 1000 - $a - $b;
last if $c < $b;
say "$a² + $b² = $c²\n$a + $b + $c =
and exit if $a2 + $b² == $c²
}
}</lang>
{{out}}
<pre>200² + 375² = 425²
200 + 375 + 425 = 1000
200 × 375 × 425 = 31875000</pre>
=={{header|REXX}}==
|