A leap year (in the Gregorian calendar) occurs:
Some examples:
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.
Register | Usage | Type | Description |
---|---|---|---|
$a0 |
input | integer | year to check |
$v0 |
output | boolean | input is leap year (0 = false , 1 = true ) |
$t0-9 |
temporary | any | used for temporary storage |
Sign up to Exercism to learn and master MIPS Assembly with 54 exercises, and real human mentoring, all for free.
Deep dive into the different algorithms and approaches you can use to solve Leap, as Jeremy and Erik explore interesting Community Solutions across 10 different languages on Exercism.