Jump to content

Arithmetic/Integer: Difference between revisions

(→‎{{header|Elixir}}: add Integer.floor_div, Integer.mod and output sample)
Line 365:
 
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}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.