Arithmetic/Integer: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 387: | Line 387: | ||
=={{header|haXe}}== |
=={{header|haXe}}== |
||
Compile on Neko with |
|||
<lang>haxe -neko basic_integer_arithmetic.n -main BasicIntegerArithmetic</lang> |
|||
<lang haxe> |
|||
class BasicIntegerArithmetic { |
|||
public static function main() { |
|||
var args = neko.Sys.args(); |
|||
if (args.length < 2) |
|||
neko.Sys.exit(0); |
|||
var a = Std.int(args[0]); |
|||
var b = Std.int(args[1]); |
|||
trace("a+b = " + (a+b)); |
|||
trace("a-b = " + (a-b)); |
|||
trace("a*b = " + (a*b)); |
|||
trace("a/b = " + (a/b)); |
|||
trace("a%b = " + (a%b)); |
|||
} |
|||
} |
|||
</lang> |
|||
=={{header|J}}== |
=={{header|J}}== |