17 lines
683 B
Text
17 lines
683 B
Text
REM https://github.com/Eva-Broccoli/OPL-Rosetta-Code/blob/main/Armtintg.opl
|
||
REM While OPL has an INT() function, it is not necessary here because OPL always uses the simplest arithmetic possible for the numbers involved. If all numbers involved are integers, integer arithmetic is used.
|
||
REM For remainder, positive numbers are rounded down; negative numbers are rounded up.
|
||
PROC main:
|
||
LOCAL a%,b%
|
||
PRINT "Please enter a number:",
|
||
INPUT a%
|
||
PRINT "Please enter another number:",
|
||
INPUT b%
|
||
PRINT a%;"+";b%;"=";a%+b%
|
||
PRINT a%;"-";b%;"=";a%-b%
|
||
PRINT a%;"×";b%;"=";a%*b%
|
||
PRINT a%;"÷";b%;"=";a%/b%
|
||
PRINT a%;"%";b%;"=";a%-a%/b%*b%
|
||
PRINT a%;"^";b%;"=";a%**b%
|
||
GET
|
||
ENDP
|