Step 6 of 6
Challenge: leap years
A year is a leap year if:
- it's divisible by 4, and
- it's not divisible by 100, unless it's also divisible by 400.
So 2024 and 2000 are leap years, but 1900 and 2023 are not.
Your turn: read a year and print leap or common.