Question: Java: Conditional testing, be clear! IsLeap Year Please write a JAVA program named IsLeap Year that prompts the user to enter a positive integer value

Java: Conditional testing, be clear! IsLeap Year Please write a JAVA programJava: Conditional testing, be clear!

IsLeap Year Please write a JAVA program named IsLeap Year that prompts the user to enter a positive integer value between 1600 and 2015 inclusive, that represents a year. As output, the program will display the date entered by the user and a statement indicating whether or not the value entered is that of a leap year. A leap year is defined by the following rules: Rule: If y is divisible by 4, then y is a leap year. Exception to the Rule: If y is also divisible by 100, then y is not a leap year. Exception to the Exception to the Rule: If y is also divisible by 400, then y is a leap year. Sample Input Data: 1999 is not a leap year because 1999 is not divisible by 4. 1624 is a leap year because 1624 is divisible by 4. 1900 is not a leap year because 1900 is divisible by 4 but is also divisible by 100. 2000 is a leap year because 2000 is divisible by 4, 100, and 400

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!