#!/usr/bin/perl

# calculator.pl
# Takes two numbers from the command line and does a number of different
# mathematical operations

$value1 = shift;  #takes the first argument from the command line
$value2 = shift;  #takes the next argument from the command line

$sum = $value1 + $value2;
$difference = $value1 - $value2;
$product = $value1 * $value2;
$ratio  = $value1 / $value2;
$power = $value1 ** $value2;

print "\nYou selected $value1 and $value2 as your numbers!\n";
print "-------------------------------------------\n";
print "The sum is: $sum\n";
print "The difference is: $difference\n";
print "The product is: $product\n";
print "The ratio is: $ratio\n";
print "$value1 to the ${value2}th power is: $power\n";

print "I could have also written the sum as: ",$value1 + $value2,"\n";

 
