Task

Determine whether a given year is a leap year in the Gregorian calendar.



See also

 Leap year (wiki)


:- pred is_leap_year(int::in) is semidet.
 
is_leap_year(Year) :-
   ( if Year mod 100 = 0 then Year mod 400 = 0 else Year mod 4 = 0 ).