Arithmetic/Integer: Difference between revisions

m
(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>
{{Output : Out}}
<PRE>
pi@debian-buster-64:~/asm64/rosetta/asm3 $ arith64 101 25
Line 1,790:
 
=={{header|Elena}}==
ELENA 46.x :
<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:(b)); // matches sign of first operand
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="ecmascriptwren">import "io" for Stdin, Stdout
System.write("first number: ")
Stdout.flush()
Anonymous user