Sha256: dd66461200ebd5ca9f119ee95ec961165e0d36d85541c0f723ba43816699a332

Contents?: true

Size: 608 Bytes

Versions: 10

Compression:

Stored size: 608 Bytes

Contents

$ include "seed7_05.s7i";

const proc: main is func
  local
    var integer: a is 0;
    var integer: b is 0;
  begin
    write("a = ");
    readln(a);
    write("b = ");
    readln(b);
 
    writeln("a + b = " <&amp; a + b);
    writeln("a - b = " <&amp; a - b);
    writeln("a * b = " <&amp; a * b);
    writeln("a div b = " <&amp; a div b);    # Rounds towards zero
    writeln("a rem b = " <&amp; a rem b);    # Sign of the first operand
    writeln("a mdiv b = " <&amp; a mdiv b);  # Rounds towards negative infinity
    writeln("a mod b = " <&amp; a mod b);    # Sign of the second operand
  end func;

Version data entries

10 entries across 7 versions & 1 rubygems

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