Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,15 @@
import Graphics.Element exposing (show)
import List exposing (map)
main =
map getWordForNum [1..100] |> show
getWordForNum num =
if num % 15 == 0 then
"FizzBuzz"
else if num % 3 == 0 then
"Fizz"
else if num % 5 == 0 then
"Buzz"
else
toString num

View file

@ -0,0 +1,18 @@
import Html exposing (text)
import List exposing (map)
import String exposing (join)
main : Html.Html
main =
map fizzbuzz [1..100] |> join " " |> text
fizzbuzz : Int -> String
fizzbuzz num =
let
fizz = if num % 3 == 0 then "Fizz" else ""
buzz = if num % 5 == 0 then "Buzz" else ""
in
if fizz == buzz then
toString num
else
fizz ++ buzz