Check Leap Year

· unclassifiedUnclassifiedmath

Check Leap Year

javamay contain transcription errors
import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int year = sc.nextInt();
if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
System.out.println("Leap Year");
else
System.out.println("Not Leap Year");
}
}
← Check if Two Strings are AnagramsCheck Palindrome (Case-Insensitive) →
Report an issue with this question