import java.util.Scanner;
class LeapYear
{
public static void main (String[]arr)
{
System.out.println("Please Enter A Year ");
Scanner Sc=new Scanner(System.in);
int year=Sc.nextInt();
if( (year%100!=0 && year%4==0) || (year%400==0) )
System.out.print("LeapYear:"+year);
else
System.out.print("It is not LeapYear:"+year);
}
}
class LeapYear
{
public static void main (String[]arr)
{
System.out.println("Please Enter A Year ");
Scanner Sc=new Scanner(System.in);
int year=Sc.nextInt();
if( (year%100!=0 && year%4==0) || (year%400==0) )
System.out.print("LeapYear:"+year);
else
System.out.print("It is not LeapYear:"+year);
}
}
0 comments:
Post a Comment