14 lines
445 B
Text
14 lines
445 B
Text
import system'math.
|
|
import extensions.
|
|
|
|
public program =
|
|
[
|
|
var a := console readLineTo(Integer new).
|
|
var b := console readLineTo(Integer new).
|
|
|
|
console printLine(a," + ",b," = ",a + b).
|
|
console printLine(a," - ",b," = ",a - b).
|
|
console printLine(a," * ",b," = ",a * b).
|
|
console printLine(a," / ",b," = ",a / b). // truncates towards 0
|
|
console printLine(a," % ",b," = ",a mod:b). // matches sign of first operand
|
|
].
|