defmodule FizzBuzz do def fizzbuzz(a) do cond do Integer.mod(a, 15) == 0 -> "FizzBuzz" Integer.mod(a, 3) == 0 -> "Fizz" Integer.mod(a, 5) == 0 -> "Buzz" :else -> a end end end defmodule Main do def main do a = IO.gets("") |> String.trim() |> String.to_integer() for a <- 1..a do IO.puts FizzBuzz.fizzbuzz(a) end end end