29 lines
734 B
Perl
29 lines
734 B
Perl
#!C:\Perl\Bin\
|
|
|
|
$number_one = 5;
|
|
$number_two = 3;
|
|
|
|
print "Adding numbers:\n";
|
|
$result = $number_one + $number_two;
|
|
print "5 + 3 = $result \n\n";
|
|
|
|
print "Subtracting numbers:\n";
|
|
$result = $number_one - $number_two;
|
|
print "5 - 3 = $result \n\n";
|
|
|
|
print "Multiplying numbers:\n";
|
|
$result = $number_one * $number_two;
|
|
print "5 * 3 = $result \n\n";
|
|
|
|
print "Dividing numbers:\n";
|
|
$result = $number_one / $number_two;
|
|
print "5 / 3 = $result \n\n";
|
|
|
|
print "Raising numbers to a power:\n";
|
|
$result = $number_one ** $number_two;
|
|
print "5 raised to the power of 3 is $result \n\n";
|
|
|
|
print "Obtaining a remainder after a division (Modulo):\n";
|
|
$result = $number_one % $number_two;
|
|
print "5 Modulo 3 is $result \n\n";
|