leap.erl

1
2
3
4
5
6
7
8
9
10
-module(leap).
-export([leap_year/1]).

leap_year(Year) ->
  if
    Year rem 400 == 0 -> true;
    Year rem 100 == 0 -> false;
    Year rem 4 == 0   -> true;
    true -> false
  end.

Comments


You're not logged in right now. Please login via GitHub to comment