Program Solution:
Here, we will using Scanner class to get the input from user and then we are using if-else statements to write the logic to check leap year.
Output :
Enter any Year:
2001
2001 is not a Leap Year.
Program Solution:
Here, we will using Scanner class to get the input from user and then we are using if-else statements to write the logic to check leap year.
Output :
Enter any Year:
2001
2001 is not a Leap Year.