RosettaCodeData/Task/Arithmetic-Integer/Elena/arithmetic-integer.elena

15 lines
448 B
Plaintext

import system'math;
import extensions;
public program()
{
var a := console.loadLineTo(new Integer());
var b := console.loadLineTo(new Integer());
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
}