// **************************************************************** // // Dates.java // // Determine whether a year entered by the user is valid. // If the year is valid, determine if it is a leap year. // // **************************************************************** import java.util.Scanner; public class Dates { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int year = 0; boolean validYear = false; boolean leapYear = false; // prompt the user to enter a year then read the year using scan.nextInt() year = scan.nextInt(); while (year != 0) // while the year is not zero, process year { // set validYear to true if year is from 1000 to 3000 inclusive // and false otherwise. // If validYear, set leapYear to true if the year is a leap year // and false if it is not a leap year. // Display the results // prompt the user to enter a year then read the year } } }