Practice ยท 2 of 5
Leap year, precisely specified
Implement boolean isLeapYear(int year). The full rule: divisible by 4 โ leap, EXCEPT centuries โ divisible by 100 is NOT leap unless also divisible by 400. So 2000 was leap, 1900 was not, 2024 is.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Practice: Decisions