leap year or not

leap year or not

LEAP YEAR OR NOT

import java.util.*;
class leapyear
{
    public static void main()
    {
        int year;
        Scanner sc=new Scanner(System.in);
        System.out.print("Input the year : ");
        year=sc.nextInt();
        if (year%4==0)
        {
            System.out.print("The year is a leap year : "+year);
        }
            else
            {
            System.out.print("the year is not a leap year : "+year);
        }
    }
}

OUTPUT
leap year or not

Post a Comment

0 Comments