Sha256: f4aba55a244df89b0fb434e85b3121e2371f06c032db0b6fd0fb0d839f452d2a

Contents?: true

Size: 685 Bytes

Versions: 10

Compression:

Stored size: 685 Bytes

Contents

run := function()
  local a, b, f;
  f := InputTextUser();
  Print("a =\n");
  a := Int(Chomp(ReadLine(f)));
  Print("b =\n");
  b := Int(Chomp(ReadLine(f)));
  Display(Concatenation(String(a), " + ", String(b), " = ", String(a + b)));
  Display(Concatenation(String(a), " - ", String(b), " = ", String(a - b)));
  Display(Concatenation(String(a), " * ", String(b), " = ", String(a * b)));
  Display(Concatenation(String(a), " / ", String(b), " = ", String(QuoInt(a, b)))); # toward 0
  Display(Concatenation(String(a), " mod ", String(b), " = ", String(RemInt(a, b)))); # nonnegative
  Display(Concatenation(String(a), " ^ ", String(b), " = ", String(a ^ b)));
  CloseStream(f);
end;

Version data entries

10 entries across 7 versions & 1 rubygems

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