Sha256: a7f89c58ab41df1649c9cc5cff539f9739d1a55b9afea4e2c8436ba2451003bd

Contents?: true

Size: 394 Bytes

Versions: 10

Compression:

Stored size: 394 Bytes

Contents

MODULE Arith EXPORTS Main;

IMPORT IO, Fmt;

VAR a, b: INTEGER;

BEGIN
  a := IO.GetInt();
  b := IO.GetInt();
  IO.Put("a+b = " & Fmt.Int(a + b) & "\n");
  IO.Put("a-b = " & Fmt.Int(a - b) & "\n");
  IO.Put("a*b = " & Fmt.Int(a * b) & "\n");
  IO.Put("a DIV b = " & Fmt.Int(a DIV b) & "\n");
  IO.Put("a MOD b = " & Fmt.Int(a MOD b) & "\n");
END Arith.

Version data entries

10 entries across 7 versions & 1 rubygems

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