Task

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



See also

 Leap year (wiki)


decl int year
set year (int args<1>)
if (= (mod year 4) 0)
        if (and (= (mod year 100) 0) (not (= (mod year 400) 0)))
                out year " is not a leap year" endl console
        else
                out year " is a leap year" endl  console
        end if
else
        out year " is not a leap year" endl console
end if