Arithmetic/Integer: Difference between revisions

Content added Content deleted
m (→‎{{header|AutoHotkey}}: Minor indentation and casing edit)
No edit summary
Line 441: Line 441:
include(`operations.m4')</lang>
include(`operations.m4')</lang>


=={{header|Mathematica}}==
Mathematica has all the function built-in to handle this task. Example:
<lang Mathematica>
a = Input["Give me an integer please!"];
b = Input["Give me another integer please!"];
Print["You gave me ", a, " and ", b];
Print["sum: ", a + b];
Print["difference: ", a - b];
Print["product: ", a b];
Print["integer quotient: ", IntegerPart[a/b]];
Print["remainder: ", Mod[a, b]];
Print["exponentiation: ", a^b];
</lang>
gives back for input 17 and 3:
<lang Mathematica>
You gave me 17 and 3
sum: 20
difference: 14
product: 51
integer quotient: 5
remainder: 2
exponentiation: 4913
</lang>


=={{header|MAXScript}}==
=={{header|MAXScript}}==