Read a year and determine if it's a leap year. A year is a leap year if it's divisible by 4, EXCEPT century years (divisible by 100), which must also be divisible by 400.
Input / Output
Input: a single year. Output: "Leap Year" or "Not a Leap Year".
Examples
Input
2024
Expected Output
Leap Year
Input
2023
Expected Output
Not a Leap Year
+ 2 hidden tests checked on Submit.
Main.java is the entry point. Add extra classes for OOP exercises — they compile together.
Run your code to see test results here.