Print All The Leap Years Between 2024 And 2024 In Java Using Scanner. You need a closing brace, your loop initializer is wrong, your increment is wrong, and your print statement won't do what you expect it to do. Leap year program in java using if else statement.
While a regular year has 365 days, the leap year has 366 days. 1) the leap(int year) function returns c=1 if the given year is a)divisible by 400 or b) divisible by 4 and not divisible by 100.