RosettaCodeData/Task/Integer-comparison/Elixir/integer-comparison.ex
2024-10-16 18:07:41 -07:00

11 lines
287 B
Elixir

{a,_} = IO.gets("Enter your first integer: ") |> Integer.parse
{b,_} = IO.gets("Enter your second integer: ") |> Integer.parse
cond do
a < b ->
IO.puts "#{a} is less than #{b}"
a > b ->
IO.puts "#{a} is greater than #{b}"
a == b ->
IO.puts "#{a} is equal to #{b}"
end