Arithmetic/Integer: Difference between revisions

→‎{{header|BASIC}}: Added True BASIC example.
m (→‎{{header|REXX}}: added words to the REXX section header.)
(→‎{{header|BASIC}}: Added True BASIC example.)
Line 389:
70 PRINT "REMAINDER OR MODULO:";A%;"%";B%;"=";A%-INT(A%/B%)*B%
80 PRINT "POWER:";A%;"^";B%;"=";A%^B%</lang>
 
==={{header|True BASIC}}===
<lang basic>
! RosettaCode: Integer Arithmetic
! True BASIC v6.007
! Translated from BaCon example.
PROGRAM Integer_Arithmetic
INPUT PROMPT "Enter integer A: ": a
INPUT PROMPT "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 ";INT(a/b);
PRINT "MOD(";a;", ";b;") is "; MOD(a,b)
PRINT "POW(";a;", ";b;") is ";INT(a^b)
GET KEY done
END
</lang>
 
=={{header|BASIC256}}==
54

edits