View Code of Problem 28

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
			int []a=new int[5];
			for(int i=0;i<=4;i++){
			a[i]=s.nextInt();
			
		if(a[i]%400==0||(a[i]%4==0&&a[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