The leap year rule: a year that divides by 4 but not by 100 is a leap year; a year that divides by 400 is also one. For example, 2024 and 2000 are leap years, 2023 and 1900 are not. Write is_leap(year): return true for a leap year, false if not.
is_leap(2024)→Trueis_leap(2023)→Falseis_leap(2000)→Truebool is_leap(int year)#include <stdbool.h>
bool is_leap(int year) {
// your code here: return true or false using the leap year rule
return false;
}
Run tries the examples. When they look right, Submit.