Guest User

Untitled

a guest
Mar 13th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. for ($c=1;$c<=1000;$c++) {
  4. for ($a=1;$a**2<$c**2;$a++) {
  5. $b=1000-$a-$c;
  6. # print "$a $b $c\n";
  7. if (($a**2 + $b**2)==$c**2) {
  8. print ($a*$b*$c);
  9. print "\n";
  10. $c=1001;
  11. }
  12. }
  13. }
Add Comment
Please, Sign In to add comment