Arithmetic/Integer: Difference between revisions

Content added Content deleted
(→‎{{header|Elixir}}: add Integer.floor_div, Integer.mod and output sample)
Line 365: Line 365:


Remainder sign matches: first operand
Remainder sign matches: first operand

==={{header|BaCon}}===
<lang freebasic>' Arthimetic/Integer
DECLARE a%, b%
INPUT "Enter integer A: ", a%
INPUT "Enter integer B: ", b%
PRINT

PRINT a%, " + ", b%, " is ", a% + b%
PRINT a%, " - ", b%, " is ", a% - b%
PRINT a%, " * ", b%, " is ", a% * b%
PRINT a%, " / ", b%, " is ", a% / b%, ", trucation toward zero"
PRINT "MOD(", a%, ", ", b%, ") is ", MOD(a%, b%), ", same sign as first operand"
PRINT "POW(", a%, ", ", b%, ") is ", INT(POW(a%, b%))</lang>


=={{header|BASIC256}}==
=={{header|BASIC256}}==