Sha256: e941140457651d0fb81d97e5847c8c05e0140ff633359f80adec8fab298d8464

Contents?: true

Size: 526 Bytes

Versions: 10

Compression:

Stored size: 526 Bytes

Contents

Mathematica has all the function built-in to handle this task. Example:
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: ", Quotient[a, b]];
Print["remainder: ", Mod[a, b]];
Print["exponentiation: ", a^b];
gives back for input 17 and 3:
You gave me 17 and 3
sum: 20
difference: 14
product: 51
integer quotient: 5
remainder: 2
exponentiation: 4913

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.6 files.zettacode/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.6 files.zettacode2/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.5 files.zettacode/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.5 files.zettacode2/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.4 files.zettacode/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.4 files.zettacode2/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.3 files.zettacode/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.2 files.zettacode/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt
zettacode-0.1.1 zettacode.files/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt