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

8 lines
173 B
Forth
Raw Permalink Normal View History

2013-04-10 15:42:53 -07: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 ;