All pastes #430465 Raw Edit

Practice2 by nano

public text v1 · immutable
·published 2007-04-09 00:20 UTC
rendered paste body
print "\nWhat operation?:\n";
print "Type \* for multiplication.\n";
print "Type + for addition.\n";
print "Type - for subtraction.\n";
print "Type / for division.\n";
print "Type \"square\" to square the sum of x and y.\n";
print "Which?: ";
$op = <STDIN>;
print "What is x?: ";
$x = <STDIN>;
print "\nWhat is y?: ";
$y = <STDIN>;
if ($op == "*")
{
$answer = x * y;
print "$answer";
}