programming-examples/perl/_Basics/Basic Numeric Operations.pl

18 lines
312 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#! /usr/local/bin/perl
$a = 4.2 + 3;
print "The result of 4.2 + 3 is $a \n";
$a = 4.2 - 3;
print "The result of 4.2 - 3 is $a \n";
$a = 4.2 * 3;
print "The result of 4.2 * 3 is $a \n";
$a = 26 / 8;
print "The result of 26 / 8 is $a \n";
$a = 26 % 8;
print "The result of 26 % 8 is $a \n";