Jump to content

Arithmetic/Integer: Difference between revisions

no edit summary
No edit summary
Line 1,214:
}
}</lang>
 
=={{header|NetRexx}}==
Reimplementation of the [[#REXX|REXX]] version below.
<lang NetRexx>/* NetRexx */
 
options replace format comments java crossref savelog symbols binary
 
say "enter 2 integer values separated by blanks"
parse ask a b
say a "+" b "=" a + b
say a "-" b "=" a - b
say a "*" b "=" a * b
say a "/" b "=" a % b "remaining" a // b "(sign from first operand)"
say a "^" b "=" a ** b
 
return
</lang>
;Output
<pre style="height: 15ex; overflow:scroll;">
enter 2 integer values separated by blanks
17 -4
17 + -4 = 13
17 - -4 = 21
17 * -4 = -68
17 / -4 = -4 remaining 1 (sign from first operand)
17 ^ -4 = 0.0000119730367
</pre>
 
=={{header|NSIS}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.