diff --git a/Algorithms/hello_world_n_times.erl b/Algorithms/hello_world_n_times.erl new file mode 100644 index 0000000..f804ca2 --- /dev/null +++ b/Algorithms/hello_world_n_times.erl @@ -0,0 +1,11 @@ +-module(solution). +-export([main/0]). + +print_hello(N) -> + [io:format("Hello World~n") || _ <- lists:seq(1,N)]. + +main() -> + {N, _} = string:to_integer(string:chomp(io:get_line(""))), + + print_hello(N), + ok. \ No newline at end of file diff --git a/Algorithms/helloworld.erl b/Algorithms/helloworld.erl new file mode 100644 index 0000000..70267bd --- /dev/null +++ b/Algorithms/helloworld.erl @@ -0,0 +1,6 @@ +-module(hello_world). +-compile(export_all). + + +hello() -> + io:format("hello world~n"). \ No newline at end of file