Arithmetic/Integer: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 965:
remainder: a % b = -21</pre>
 
=={{header|Liberty BASIC}}==
Note that raising to a power can display very large integers without going to approximate power-of-ten notation.
<lang lb>
input "Enter the first integer: "; first
input "Enter the second integer: "; second
 
print "The sum is " ; first + second
print "The difference is " ; first -second
print "The product is " ; first *second
if second <>0 then print "The integer quotient is " ; int( first /second); " (rounds towards 0)" else print "Division by zero unallowed."
print "The remainder is " ; first MOD second; " (sign matches first operand)"
print "The first raised to the power of the second is " ; first ^second
</lang>
=={{header|Logo}}==
<lang logo>to operate :a :b
Anonymous user