RosettaCodeData/Task/Arithmetic-Integer/Forth/arithmetic-integer-1.fth

8 lines
173 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
: arithmetic ( a b -- )
cr ." a=" over . ." b=" dup .
cr ." a+b=" 2dup + .
cr ." a-b=" 2dup - .
cr ." a*b=" 2dup * .
cr ." a/b=" /mod .
cr ." a mod b = " . cr ;