Computer Science, asked by bszaid, 1 year ago

write a program to input a year example 1994 and check whether it is a leap year

Answers

Answered by BrainlyPromoter
0

import java.util.Scanner;

public class leap

{

   public static void calc()

   {

       Scanner brainly=new Scanner(System.in);

       System.out.print("Enter the year you want to check.");

       int a=brainly.nextInt();

       if(a%400==0)

       System.out.println("The entered year is a leap year.");

       else

       System.out.println("The entered year is not a leap year.");

   }

}


Originally answered by me at: https://brainly.in/question/5848254

Similar questions