Help for this page

Select Code to Download


  1. or download this
    #! Perl -w
    # hypo.pl -- find the hypotenuse
    ...
    print "\tChoice: ";
    chomp(my $choice = <STDIN>);
    compute($choice);
    
  2. or download this
    #! Perl -w
    # clhypo.pl -- Hypotenuse command line version
    ...
            $a = sqrt($c**2 - $b**2);
        print "A is $a";
    }