Check given year is Leap year or not between two years using for loop (Take input from user). code example
Example: java leap years
public static boolean isLeapYear(int year) {
if (year % 4 != 0) {
return false;
} else if (year % 100 != 0) {
return true;
} else if (year % 400 != 0) {
return false;
} else {
return true;
}
}