Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Q. Java Program to Find if a Given Year is a Leap Year.

Leap Year contains 366 days, which comes once every four years. Every leap year corresponds to these facts :

#A century year is a year ending with 00. A century year is a leap year only if it is divisible by 400. #A leap year (except a century year) can be identified if it is exactly divisible by 4. #A century year should be divisible by 4 and 100 both. #A non-century year should be divisible only by 4.

Ex. INPUT: 2000 OUTPUT: 2000 : Leap-year LOGIC: 2000 is a century year divisible by 100 and 4. INPUT: 2002 OUTPUT: 2002 : Non Leap-year LOGIC: 2002 is not divisible by 4, therefore not a leap year.