Sha256: 3a89859a9a94bcdcdc2d95031ece3a9ee0e05d4bcd2a41a05ae25e6d8d757dbd

Contents?: true

Size: 406 Bytes

Versions: 10

Compression:

Stored size: 406 Bytes

Contents

let a = int_of_string(Sys.argv[2])
let b = int_of_string(Sys.argv[3])

let sum = a + b
let difference = a - b
let product = a * b
let division = a / b
let remainder = mod(a, b)

Js.log("a + b = " ++ string_of_int(sum))
Js.log("a - b = " ++ string_of_int(difference))
Js.log("a * b = " ++ string_of_int(product))
Js.log("a / b = " ++ string_of_int(division))
Js.log("a % b = " ++ string_of_int(remainder))

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/arithmetic.integer/rescript.txt
zettacode-0.1.6 files.zettacode/arithmetic.integer/rescript.txt
zettacode-0.1.6 files.zettacode2/arithmetic.integer/rescript.txt
zettacode-0.1.5 files.zettacode/arithmetic.integer/rescript.txt
zettacode-0.1.5 files.zettacode2/arithmetic.integer/rescript.txt
zettacode-0.1.4 files.zettacode/arithmetic.integer/rescript.txt
zettacode-0.1.4 files.zettacode2/arithmetic.integer/rescript.txt
zettacode-0.1.3 files.zettacode/arithmetic.integer/rescript.txt
zettacode-0.1.2 files.zettacode/arithmetic.integer/rescript.txt
zettacode-0.1.1 zettacode.files/arithmetic.integer/rescript.txt