Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/FizzBuzz/Nemerle/fizzbuzz.nemerle
Normal file
19
Task/FizzBuzz/Nemerle/fizzbuzz.nemerle
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Console;
|
||||
|
||||
module FizzBuzz
|
||||
{
|
||||
FizzBuzz(x : int) : string
|
||||
{
|
||||
|x when x % 15 == 0 => "FizzBuzz"
|
||||
|x when x % 5 == 0 => "Buzz"
|
||||
|x when x % 3 == 0 => "Fizz"
|
||||
|_ => $"$x"
|
||||
}
|
||||
|
||||
Main() : void
|
||||
{
|
||||
foreach (i in [1 .. 100])
|
||||
WriteLine($"$(FizzBuzz(i))")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue