bool IsLeapYear(int year) // precondition: year > 0 // postcondition: returns true if year is a leap year, else false { return (year % 400 == 0) || (year % 100 != 0 && year % 4 == 0); }