Computer Science, asked by barnalisarkar89132, 5 months ago

write a Java program that accepts year and check whether the year is leap year or not. ​

Answers

Answered by riyalubana332
2

Answer:

this answer is sure yes

Answered by Nothing123345678
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