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 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
Heres a Java program that determines if a year is a leap year based on the given criteria java impor... View full answer
Get step-by-step solutions from verified subject matter experts
