1. Ask the user how many year inputs he wants to check - an integer. o Assume that the user always gives an input which is between 1 and 5 (inclusive). 2. Next, ask the user for K number of year...

1. Ask the user how many year inputs he wants to check - an integer. o Assume that the user always gives an input which is between 1 and 5 (inclusive). 2. Next, ask the user for K number of year inputs where K = the number user has given as input before (inside a while loop). o See point 5 for more details on this. 3. Check for each input whether that year is a leap year or not o Take year input (positive integer - should be between 1500 and 2020, inclusive). o If the year input is not between 1500 and 2020, do not check for leap year, rather print that this year cannot be checked. o If the input year is a leap year, print that year is a leap year; otherwise, print that the year is not a leap year. o make sure to handle the centurial years, i.e., years ending in 00, e.g., 1900, 1800, 1700, 2000, etc.? 4. Use a while/for loop for this assignment. 5. Creating a method: o The main() method will take the first user input -- K (between 1 and 5). o The leap year checking will be done in a separate method called " check_leapyear() " o K will be passed to this method as a parameter and this method will not return anything. o Within this check_leapyear() method, take K user inputs, and check whether they are leap years or not. import java.util.*;

Nov 29, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here