Write a function that tells if the given year is a leap year or not. To recall the rules about leap years, check the exercise .
Interface
C++ | bool is_leap_year(int year); |
C | int is_leap_year(int year); |
Java | public static boolean isLeapYear(int year); |
Python | is_leap_year(year) # returns bool |
is_leap_year(year: int) -> bool |
Precondition The parameter year is between 1800 and 9999, both included.
Observation You only need to submit the required procedure; your main program will be ignored.
Input/Output