Jump to content

Arithmetic/Integer: Difference between revisions

add language: Retro
(add language: Retro)
Line 1,297:
Remainder sign matches: first
Exponentiation: 1.19730367213036E-5</pre>
 
=={{header|Retro}}==
Retro's arithmetic functions are based on those in [[Forth]]. The example is an adaption of the one from Forth.
<lang Retro>: arithmetic ( ab- )
cr "a = " puts over putn
cr "b = " dup putn
cr "a + b = " puts 2dup + putn
cr "a - b = " puts 2dup - putn
cr "a * b = " puts 2dup * putn
cr "a / b = " puts /mod putn
cr "a mod b = " puts putn cr ;</lang>
 
=={{header|REXX}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.