Posted By

cmm7825 on 05/20/10


Tagged


Versions (?)

Problem 9


 / Published in: Perl
 

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4.  
  5. foreach my $a (1..1000)
  6. {
  7. foreach my $b (1..1000)
  8. {
  9. my $c = sqrt($a*$a+$b*$b);
  10. my $result = $a+$b+$c;
  11. die eval("$a*$b*$c") if $result==1000;
  12. }
  13. }

Report this snippet  

You need to login to post a comment.