Arithmetic/Integer: Difference between revisions

m
Line 1,320:
 
=={{header|Elena}}==
ELENA 3.4.x :
<lang elena>import system'math.;
import extensions.;
 
public program()
{
[
var a := console readLineTo.loadLineTo(Integer new Integer().);
var b := console readLineTo.loadLineTo(Integer 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
]}</lang>
 
=={{header|Elixir}}==
Anonymous user