Sha256: 66491a8efe57efa91f815e49e2dc764b596c1c26b809da1b6e5444f4dff34619

Contents?: true

Size: 357 Bytes

Versions: 10

Compression:

Stored size: 357 Bytes

Contents

PROC main()
  DEF a, b, t
  WriteF('A = ')
  ReadStr(stdin, t)
  a := Val(t)
  WriteF('B = ')
  ReadStr(stdin, t)
  b := Val(t)
  WriteF('A+B=\d\nA-B=\d\n', a+b, a-b)
  WriteF('A*B=\d\nA/B=\d\n', a*b, a/b)
  /* * and / are 16 bit ops; Mul and Div are 32bit ops */
  WriteF('A*B=\d\nA/B=\d\n', Mul(a,b), Div(a,b))
  WriteF('A mod B =\d\n', Mod(a,b))
ENDPROC

Version data entries

10 entries across 7 versions & 1 rubygems

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