Sha256: b16338574a08a3636957d025017fb5312acc62bcc7fb3bde8a1abf787d95a2dc

Contents?: true

Size: 290 Bytes

Versions: 10

Compression:

Stored size: 290 Bytes

Contents

local x = io.read()
local y = io.read()

print ("Sum: "       , (x + y))
print ("Difference: ", (x - y))
print ("Product: "   , (x * y))
print ("Quotient: "  , (x / y)) -- Does not truncate
print ("Remainder: " , (x % y)) -- Result has sign of right operand
print ("Exponent: "  , (x ^ y))

Version data entries

10 entries across 7 versions & 1 rubygems

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