Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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