Sha256: 67519922b6351b6a5c1ce5aae77f5be2d884988ee3a0a30e814927aedc6f7e53

Contents?: true

Size: 434 Bytes

Versions: 10

Compression:

Stored size: 434 Bytes

Contents

import std.stdio, std.string, std.conv;

void main() {
    int a = 10, b = 20;
    try {
        a = readln().strip().to!int();
        b = readln().strip().to!int();
    } catch (StdioException e) {}
    writeln("a = ", a, ", b = ", b);

    writeln("a + b = ", a + b);
    writeln("a - b = ", a - b);
    writeln("a * b = ", a * b);
    writeln("a / b = ", a / b);
    writeln("a % b = ", a % b);
    writeln("a ^^ b = ", a ^^ b);
}

Version data entries

10 entries across 7 versions & 1 rubygems

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