leap year
import java.util.Scanner; public class even { public static void main (String[] args) { System. out .println( "Enter a number to determine the if it is a leap year or not" ); Scanner input = new Scanner(System. in ); while (!input.hasNextInt()){ System. out .println( "Enter a whole number" ); input.next(); } int number; number = input.nextInt(); if (number % 400 == 0 ){ System. out .println(number + " " + "is a leap year" ); } else { System. out .println(number + " " + "is not a leap year" ); } } }