Special pythagorean triplet: Difference between revisions

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


=={{header|REXX}}==
=={{header|REXX}}==