Created
September 9, 2022 21:50
-
-
Save uxjp/51a341b28b19aea4d1e3e682f8426dc8 to your computer and use it in GitHub Desktop.
Hacker hank scanning 2 integers from STDIN, calling a function, returning a value, and printing it to STDOUT.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Solution do | |
a = IO.gets(nil) |> String.trim |> String.to_integer | |
b = IO.gets(nil) |> String.trim |> String.to_integer | |
a + b |> IO.puts | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Think if its possible to do it all in one single sequence of pipes.