CJCoding With Joseph

Leap Year Check (Input)

Read an int called year from standard input. A year is a leap year when it is divisible by 4, except that years divisible by 100 are NOT leap years unless they are also divisible by 400. If year is a leap year, print <year> is a leap year; otherwise print <year> is not a leap year.

For the input 2020 the output is:

2020 is a leap year

Expected Output:

2020 is a leap year
Topics:
If Statements
๐Ÿ“ฅ Auto-Input:
2020\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.