View Code of Problem 28


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

			Scanner scanner=new Scanner(System.in);
			while (scanner.hasNext()) {
				String string = (String) scanner.next();
				int i=Integer.parseInt(string);
				if (i%400==0) {
					System.out.println("Leap Year");
				}else if (i%4==0&&i%100!=0) {
					System.out.println("Leap Year");
				}else {
					System.out.println("Not Leap Year");
				}
			}
	}
}

Double click to view unformatted code.


Back to problem 28