Practice2 by nano
public text v1 · immutableprint "\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";
}