Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/FizzBuzz/Egel/fizzbuzz.egel
Normal file
19
Task/FizzBuzz/Egel/fizzbuzz.egel
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import "prelude.eg"
|
||||
import "io.ego"
|
||||
|
||||
using System
|
||||
using IO
|
||||
|
||||
def fizzbuzz =
|
||||
[ 100 -> print "100\n"
|
||||
| N ->
|
||||
if and ((N%3) == 0) ((N%5) == 0) then
|
||||
let _ = print "fizz buzz, " in fizzbuzz (N+1)
|
||||
else if (N%3) == 0 then
|
||||
let _ = print "fizz, " in fizzbuzz (N+1)
|
||||
else if (N%5) == 0 then
|
||||
let _ = print "buzz, " in fizzbuzz (N+1)
|
||||
else
|
||||
let _ = print N ", " in fizzbuzz (N+1) ]
|
||||
|
||||
def main = fizzbuzz 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue