Sha256: 2ea300d8b135e49941265145a8e8e0d09e84ba31ff030f4054766037616c4dde

Contents?: true

Size: 311 Bytes

Versions: 10

Compression:

Stored size: 311 Bytes

Contents

string s[];
message "input number a: ";
s1 := readstring;
message "input number b: ";
s2 := readstring;
a := scantokens s1;
b := scantokens s2;

def outp(expr op) =
  message "a " & op & " b = " & decimal(a scantokens(op) b) enddef;

outp("+");
outp("-");
outp("*");
outp("div");
outp("mod");

end

Version data entries

10 entries across 7 versions & 1 rubygems

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