CJCoding With Joseph
15free / daySign inCreate account

Leap Year Check

A year is a leap year if it is divisible by 4, except that years divisible by 100 are not leap years unless they are also divisible by 400. So 2024 and 2000 are leap years, but 1900 is not. Read one integer year and print Leap year or Not a leap year. This combines several conditions, so use the logical operators && (and) and || (or) inside one if statement.

Expected Output:

Leap year

= newline. No newline after the last line.

Hints3 available
Topics:
If Statements
📥 Auto-Input:
2024\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.