//wap wheather a given number is leap year or not
//wap wheather a given number is leap year or not
import java.util.Scanner;
class leapyear
{
public static void main(String[] arg)
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter year : ");
int year=sc.nextInt();
if(year%100==0)
{
if(year%400==0)
System.out.println("Input year is leap year");
else
System.out.println("Input year is not leap year");
}
else if(year%4==0)
System.out.println("input year is leap year");
else
System.out.println("input year is not leap year");
}
}
Comments
Post a Comment