Anonymous user
Arithmetic/Integer: Difference between revisions
m
→{{header|Elena}}
(Added various BASIC dialects (Chipmunk Basic, GW-BASIC, MSX Basic, Quite BASIC, Minimal BASIC ans XBasic)) |
imported>Arakov |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 333:
.include "../includeARM64.inc"
</syntaxhighlight>
{{
<PRE>
pi@debian-buster-64:~/asm64/rosetta/asm3 $ arith64 101 25
Line 1,790:
=={{header|Elena}}==
ELENA
<syntaxhighlight lang="elena">import system'math;
import extensions;
Line 1,803:
console.printLine(a," * ",b," = ",a * b);
console.printLine(a," / ",b," = ",a / b); // truncates towards 0
console.printLine(a," % ",b," = ",a.mod
console.printLine(a," ^ ",b," = ",a ^ b);
}</syntaxhighlight>
Line 5,939:
The sign of the remainder operator '%' matches the sign of the first operand.
<syntaxhighlight lang="
System.write("first number: ")
Stdout.flush()
|