Arithmetic/Integer: Difference between revisions
Content added Content deleted
m (Added Eiffel (SmartEiffel 2.4)) |
(Added PicoLisp) |
||
Line 801: | Line 801: | ||
"remainder: ", $a % $b, "\n"; |
"remainder: ", $a % $b, "\n"; |
||
?></lang> |
?></lang> |
||
=={{header|PicoLisp}}== |
|||
<lang PicoLisp>(de math (A B) |
|||
(prinl "Add " (+ A B)) |
|||
(prinl "Subtract " (- A B)) |
|||
(prinl "Multiply " (* A B)) |
|||
(prinl "Divide " (/ A B)) # Trucates towards zero |
|||
(prinl "Div/rnd " (*/ A B)) # Rounds to next integer |
|||
(prinl "Modulus " (% A B)) # Sign of the first operand |
|||
(prinl "Power " (** A B)) )</lang> |
|||
=={{header|PL/I}}== |
=={{header|PL/I}}== |