Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (6 sloc) 262 Bytes
-module(fizzbuzz).
-export([run/1]).
run(N) when N rem 3 == 0, N rem 5 == 0 -> io:fwrite("~p~n", ["fizzbuzz"]);
run(N) when N rem 3 == 0 -> io:fwrite("~p~n", ["fizz"]);
run(N) when N rem 5 == 0 -> io:fwrite("~p~n", ["buzz"]);
run(N) -> io:fwrite("~p~n", [N]).
Something went wrong with that request. Please try again.