Task

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



See also

 Leap year (wiki)


func LeapYear(Y);       \Return 'true' if Y is a leap year
int Y;
[if rem(Y/100)=0 then return rem(Y/400)=0;
return rem(Y/4)=0;
];