Question: Write a Java program that determines if a year is a leap year. All years divisible by 4 are leap years with one exceptions:

Write a Java program that determines if a year is a leap  

Write a Java program that determines if a year is a leap year. All years divisible by 4 are leap years with one exceptions: any year divisible by 100 and NOT dividable by 400 is NOT a leap year For example: 2004 is a leap year, 2000 is a leap year, 1900 is not a leap year. Your program must ask the user to enter a year then print: "The year is a leap year" or "The year is not a leap year". You must use if/else statements in your program. Write and run your program then call the lab assistant or the instructor over and show them you have finished the exercise.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java program that determines if a year is a leap year based on the given criteria java impor... View full answer

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 Operating System Questions!