Question

Leap Year The month of February normally has 28 days. But if it is a leap...

Leap Year

The month of February normally has 28 days. But if it is a leap year, February has 29 days. Write a program that asks the user to enter a year. The program should then display the number of days in February that year. Use the following criteria to identify leap years:

Determine whether the year is divisible by 100.

  • If it is, then it is a leap year if and if only it is also divisible by 400. For example, 2000 is a leap year but 2100 is not.
  •   If the year is not divisible by 100, then it is a leap year if and if only it is divisible by 4. For example, 2008 is a leap year but 2009 is not.

Note the answer should be in assembly language using windows 32 and .586

Homework Answers

Answer #1

/*If this helps you, please let me know by giving a positive thumbs up. In case you have any queries, do let me know. I will revert back to you. Thank you!!*/

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
A year with 366 days is called a leap year. A year is a leap year...
A year with 366 days is called a leap year. A year is a leap year if it is divisible by four (for example, 1980), except that it is not a leap year if it is divisible by 100 (for example, 1900); however, it is a leap year if it is divisible by 400 (for example, 2000). There were no exceptions before the introduction of the Gregorian calendar on October 15, 1582 (1500 was a leap year). Write a program...
Need this program in Java Develop (using C++ or Java language) the software application described below....
Need this program in Java Develop (using C++ or Java language) the software application described below. Write a program that prints the day number of the year, given the date is in the form month-day-year. For example, if the input is 1-1-09, the day number is 1; if the input is 12-25-09, the day number is 359. The program should check for a leap year. A year is a leap year if it is divisible by 4 but not divisible...
3.21 LAB C++ Code: Leap Year A year in the modern Gregorian Calendar consists of 365...
3.21 LAB C++ Code: Leap Year A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are: 1) The year must be divisible by 4 2) If...
In this Java programming assignment, you will practice using selection statements to determine whether a given...
In this Java programming assignment, you will practice using selection statements to determine whether a given year in the past or future qualifies as a “Leap Year”. I. Design a class called LeapYear in a file called LeapYear.java. This class will hold the main method and the class method that we will write in this assignment. II. Write an empty public static void main(String[] args) method. This method should appear inside the curly braces of the LeapYear class. III. Write...
Write a program (C language) that will read the number of a month and will print...
Write a program (C language) that will read the number of a month and will print the number of days in the month. Ignore leap years. Use 28 days for February. Have the program runs in a continuous loop, allowing the user to enter a month number, see that number of days, and repeat. Use month number = 0 to exit the loop and the program. Program must meet the following criteria: 1.Your name and the name of the program...
Instructions PowerShell Assignment #1 Objective: Learn basic Powershell scripting in Windows Setup: A Windows computer with...
Instructions PowerShell Assignment #1 Objective: Learn basic Powershell scripting in Windows Setup: A Windows computer with the latest Powershell environment installed Script #1 – Hello World! Description:  The classical introductory exercise: Just say "Hello, World!". Purpose: A "Hello, World!" program is traditionally used to introduce novice programmers to a programming language. It is also to make sure that the interpreter is installed correctly, and that the user understands how to use it. Instructions:  Complete this assignment to make sure that you know...
How much money do you think you would earn in a period of 30 days if...
How much money do you think you would earn in a period of 30 days if you were paid as follows: one cent for the first day, two cents for the second day, four cents for the third day, eight cents for the fourth day, and so on (i.e. your salary doubles each day)? Do you think you would make very little money, just a few dollars, at the end of the 30-day period? Let us write a program to...
public static void main(String[] args) {        // TODO Auto-generated method stub        Scanner...
public static void main(String[] args) {        // TODO Auto-generated method stub        Scanner keyboard = new Scanner(System.in);        System.out.println("Enter a date in the format month/day/year");        String date = keyboard.nextLine();        //Make a copy        String dateCopy = date;               //Extract the values        //start with month        //indexOf() is used to find the index of a specified character in a givenString        int workingIndex = date.indexOf("/");...
A loan made on March 14 is due September 13 of the following year. Find the...
A loan made on March 14 is due September 13 of the following year. Find the exact time for the loan in a​ non-leap year and a leap year. days. The exact time in a​ non-leap year is ? days The exact time in a leap year is ? days. Data Table Sequential Numbers for Dates of the Year Day of Month Jan. Feb. Mar. Apr. May June July Aug. Sept. Oct. Nov. Dec. 1 1 32 60 91 121...
CSE 231                                         &n
CSE 231                                                                                                                        Fall 2019 Project #2 ## Language Should be Python. Assignment Specifications The program will compute and display information for a company which rents vehicles to its customers. For a specified customer, the program will compute and display the amount of money charged for that customer’s vehicle rental. The program should start by asking the user if he wants to continue. The answer is ‘Y’ for yes or ‘N’ for no. You can check the value with Boolean expressions such...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT