Find Leap Year
import java.util.Scanner;
public class LeapYear {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = 1;
while (n==1){
System.out.println("Enter the year: ");
int y = sc.nextInt();
if (y%4==0){
System.out.println("Yes, it's a leap year");
}
else {
System.out.println("No, it's not a leap year");
}
}
}
}