langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
17
Task/Arithmetic-Integer/Nemerle/arithmetic-integer.nemerle
Normal file
17
Task/Arithmetic-Integer/Nemerle/arithmetic-integer.nemerle
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
|
||||
class Program
|
||||
{
|
||||
static Main(args : array[string]) : void
|
||||
{
|
||||
def a = Convert.ToInt32(args[0]);
|
||||
def b = Convert.ToInt32(args[1]);
|
||||
|
||||
Console.WriteLine("{0} + {1} = {2}", a, b, a + b);
|
||||
Console.WriteLine("{0} - {1} = {2}", a, b, a - b);
|
||||
Console.WriteLine("{0} * {1} = {2}", a, b, a * b);
|
||||
Console.WriteLine("{0} / {1} = {2}", a, b, a / b); // truncates towards 0
|
||||
Console.WriteLine("{0} % {1} = {2}", a, b, a % b); // matches sign of first operand
|
||||
Console.WriteLine("{0} ** {1} = {2}", a, b, a ** b);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue