Sha256: f061e24219d5871e4d5e5f0f7e2fa87c13c93873b2778970948b1402a100ce2b

Contents?: true

Size: 379 Bytes

Versions: 10

Compression:

Stored size: 379 Bytes

Contents

declare
  StdIn = {New class $ from Open.file Open.text end init(name:stdin)}

  fun {ReadInt}
     {String.toInt {StdIn getS($)}}
  end

  A = {ReadInt}
  B = {ReadInt}
in
  {ForAll
   ["A+B = "#A+B
    "A-B = "#A-B
    "A*B = "#A*B
    "A/B = "#A div B  %% truncates towards 0
    "remainder "#A mod B  %% has the same sign as A
    "A^B = "#{Pow A B}
   ]
   System.showInfo}

Version data entries

10 entries across 7 versions & 1 rubygems

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