#!/usr/local/usr/perl
print ("\n\nWould you like to add, multiply, minus or divide:\n");
$maths = <STDIN>;
chomp ($maths);
print("\n\nNow enter the first number for the sum:\n");
$num1 = <STDIN>;
chomp ($num1);
print("\n\nNow enter the second number for the sum:\n");
$num2 = <STDIN>;
chomp ($num2);
if ($maths eq 'add')
{
print ("\n\n");
print("Your answer is: ","$num1" + "$num2");
print ("\n\n");
}
elsif ($maths eq 'multiply')
{
print ("\n\n");
print("Your answer is: ","$num1" * "$num2");
print ("\n\n");
}
elsif ($maths eq 'minus')
{
print ("\n\n");
print("Your answer is: ","$num1" - "$num2");
print ("\n\n");
}
else
{
print ("\n\n");
print("Your answer is: ","$num1" / "$num2");
print ("\n\n");
}
print("Program Complete...Closing\n\n");
<STDIN>;