Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Factorial;
- import java.util.Scanner;
- public class lEAPYEAR {
- public static void main(String[] args) {
- Scanner ss = new Scanner(System.in);
- int year = ss.nextInt();
- if (year % 4 == 0) {
- if (year % 100 != 0) {
- System.out.println("Yes");
- } else if (year % 400 != 0) {
- System.out.println("Yes");
- } else {
- System.out.println("NO");
- }
- } else {
- System.out.println("No");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement