Leap Year
beginnerUp next
Up next
Output will appear here...
A leap year (in the Gregorian calendar) occurs:
Some examples:
Note
For a delightful, four-minute explanation of the whole phenomenon of leap years, check out this YouTube video.
Your task is to determine whether a given year is a leap year.
A single integer year.
Print true if it is a leap year, otherwise false.
Adapted from the Leap exercise on Exercism (MIT License). Original source: CodeRanch Cattle Drive, Assignment 3 (https://web.archive.org/web/20240907033714/https://coderanch.com/t/718816/Leap).
No comments yet. Start the discussion.