Arithmetic/Integer: Difference between revisions

→‎[[Perl]]: new example without map and the array -- that was distracting from the intent of the task
(add E example)
(→‎[[Perl]]: new example without map and the array -- that was distracting from the intent of the task)
Line 77:
[[Category:Perl]]
 
my $fa = <>;
my $sb = <>;
print
print map {"$_->[0]:\t$_->[1]\n"} (
["sum: =>", $fa + $s]b, "\n",
["difference: =>", $fa - $s]b, "\n",
["product: =>", $fa * $s]b, "\n",
['"integer quotient': =>", int($fa / $sb)], "\n",
["remainder: =>", $fa % $s]b, "\n"
;
);
 
==[[Pop11]]==
Anonymous user