View Code of Problem 28

import java.util.Scanner;

class Main{
  
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int a = scanner.nextInt();
            System.out.println(((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0)) ? "Leap Year" : "Not Leap Year");
        }
    }
}

Double click to view unformatted code.


Back to problem 28