19 lines
298 B
Plaintext
19 lines
298 B
Plaintext
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
|