31ph4n70m

minimun_of_two.ex

Nov 21st, 2019
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Erlang 1.35 KB | None | 0 0
  1. # elixir solution to codeabbey challenge 4
  2. defmodule Fnc do
  3.     def min_val_two(v1, v2) do
  4.         if v1 < v2 do
  5.             IO.puts v1
  6.         else
  7.             IO.puts v2
  8.         end
  9.     end
  10. end
  11.  
  12. defmodule Main do
  13.     def func(:eof) do
  14.     end
  15.  
  16.     def main do
  17.         Fnc.min_val_two(3539875, -2913804)
  18.         Fnc.min_val_two(9970403, -1271892)
  19.         Fnc.min_val_two(2259745, -5041103)
  20.         Fnc.min_val_two(6135274, 6702733)
  21.         Fnc.min_val_two(-7705887, 7333693)
  22.         Fnc.min_val_two(9011193, -5815604)
  23.         Fnc.min_val_two(-4443223, -3369396)
  24.         Fnc.min_val_two(6454782, 5927252)
  25.         Fnc.min_val_two(8752154, 8363617)
  26.         Fnc.min_val_two(-4610650, 9748221)
  27.         Fnc.min_val_two(6825533, -3597316)
  28.         Fnc.min_val_two(6931901, 7542523)
  29.         Fnc.min_val_two(-2603266, 9437222)
  30.         Fnc.min_val_two(5903501, 9517359)
  31.         Fnc.min_val_two(-8975159, -2311126)
  32.         Fnc.min_val_two(8014504, 4564716)
  33.         Fnc.min_val_two(4775069, 7984907)
  34.         Fnc.min_val_two(-6707176, -2965185)
  35.         Fnc.min_val_two(-7056195, 9428098)
  36.         Fnc.min_val_two(-6262451, -4762083)
  37.         Fnc.min_val_two(6761791, -7251257)
  38.         Fnc.min_val_two(-577687, -7681432)
  39.         Fnc.min_val_two(-620653, -4122904)
  40.         Fnc.min_val_two(8245820, -1868499)
  41.         Fnc.min_val_two(-5759287, -6364830)
  42.         Fnc.min_val_two(-2120277, -8933753)
  43.         Fnc.min_val_two(37854, -5188376)
  44.         Fnc.min_val_two(8608770, 7434587)
  45.         Fnc.min_val_two(-5751153, 4512272)
  46.         Fnc.min_val_two(6951946, -4726312)
  47.     end
  48. end
  49.  
  50. Main.main
Add Comment
Please, Sign In to add comment