// program to find the given year is leap year or not
import java.io.*;
class a25
{
public static void main(String arg[]) throws IOException
{
int n;
BufferedReader inp= new BufferedReader(new InputStreamReader(System.in));
System.out.println("\n\t\t\tFinding Leap Year");
System.out.println("\n\t\t\t~~~~~~~~~~~~~~~~~");
System.out.print("\nEnter the Year: ");
n=Integer.parseInt(inp.readLine());
if( (n%400==0)||( (n%100!=0)&& (n%4==0)) )
{
System.out.println("This Year "+n+" is a Leap Year");
}
else
{
System.out.println("This Year "+n+" is a not Leap Year");
}
}
}In this program, easy to calculate the given year is leap or not using Java Program.
