write a Java program that accepts year and check whether the year is leap year or not.
Answers
Answered by
2
Answer:
this answer is sure yes
Answered by
5
Answer:
import java.util.Scanner;
public class LeapYear
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int year;
System.out.println("Enter any Year:");
year = in.nextInt();
if(year % 4 == 0)
{
if( year % 100 == 0)
{
if ( year % 400 == 0)
System.out.println("Leap year");
else
System.out.println("Not a leap year");
}
}
Answer...Mark me brainliest and follow me
Similar questions