Calculate the day of the week for that date

Assignment Help Basic Computer Science
Reference no: EM13850686

The value of d is the answer, and represents the number of the day of the week, with Sunday = 0. The value of d is 0 for a Sunday, 1 for a Monday, 2 for a Tuesday, etc.

Remember that all division is integer division.

Program Specifications:

• First, your program will print the Programming Assignment number, your name, and your class account, all on one line.

• Then your program will print "Enter a date (MM/DD/YYYY): " as a prompt for the user to enter the date.

• Your program will calculate the day of the week for that date.

• Your program will then print "That day is a " followed by the day of the week.

• Your format should match the example that follows exactly.

Example:

Output is being recorded in, outfile5665 Program #1, Alan Riggins, mascxxxx

Enter a date (MM/DD/YYYY):

12/07/1941

That day is a Sunday.

Additional Details:

• Your program does not need to do any error checking. You may assume that the sole input value is a valid four digit integer that represents a year. If the user enters garbage or the wrong number of digits, we expect the output to be garbage.

• Remember that any time you read input from the keyboard via linein you must have allocated a butler of at least 80 bytes.

• Your answer output line must be all on one line, as in the example.

• Remember that all strings you print must be null terminated.

• You may not use any loop or branch instructions (you don't need them).

• The calendar has changed over the centuries. The last change occurred in the eighteenth century. Thus, your program will be limited to years in the range 1800 .. 9999.

Its easy to check dates on rohan. At the prompt, type: cal MONTH YEAR and it will display a calendar for that year.

Reference no: EM13850686

Questions Cloud

Income inequality gap in the united states : Problem 1: Using the sociological perspective of your choice, how might you explain the widening income inequality gap in the United States and around the world?
What experience have you already had in life : What experience have you already had in life that would prepare you for leading subordinate through adversity?
System of ranking in a society : 1. A system of ranking in a society that perpetuates unequal power and resources is:
Write a program that starts a player off with a bank of $15 : Write a program that starts a player off with a bank of $15.00.
Calculate the day of the week for that date : If the user enters garbage or the wrong number of digits, we expect the output to be garbage - The calendar has changed over the centuries
Describe the marketing challenge : DEFINING THE MARKETING CHALLENGE/INTRODUCTION. Describe the marketing challenge (new business, new good, new service, etc.). Why was this particular challenge chosen to review? (group interest, group experience, etc.)
What contractual provisions might be called into play : What issues are raised by this scenario, why and what might you do about it? What contractual provisions might be called into play?
Discuss how you will change the organizational structure : Discuss how you'll change the organizational structure of your company to make company operations efficient and how you'll manage the transition activities in the organizational structure conversion process to assure a successful transition
Understand the financial controls used in food operations : Understand different food and beverage production and service systems. Understand the financial controls used in food and beverage operations

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Construct the work breakdown structure

Construct the Work Breakdown Structure, define all of the activities and sequence these, schedule the project and then resource and budget the project using Microsoft Office Project.

  Adding two unsigned and signed binary numbers

Add the two binary numbers and interpret the sum assuming that the numbers are (1) unsigned, and (2) signed.

  How to operate a computer system

Compose a letter to simon on how to operate a computer system

  Determine characters in the encyclopedia

The text of the Encyclopedia Britannica is about 44 million words. For a sample of about 2000 words, the average word length was 6.1 characters per word. Approximately how many characters are there in the encyclopedia?

  Foundations of information technology

For your final project, select an industry and company of your choice. Write an 8-10 page research report (typed, double-spaced) or a 4-5 page research report with accompanying PowerPoint presentation (15-20 slides) in which you: Describe the company..

  What are some ways increase our chances of success

IT Projects are notoriously difficult to complete successfully and they are expensive to start with. Most failures can be attributed to issues not directly tied to technology issues, but rather issues of organizational behavior.What are some ways in ..

  Mechanism that supports process dispatching

The X25-Demodulator machine does not provide a mechanism for interrupts; any process in the X25 OS is non-preemptive. In addition, the OS does not provide a means for selecting the next job to run. Provide the design and justification for your..

  Article relevant to current social engineering threats

Select an article relevant to current social engineering threats.

  What personal leadership characteristics

What personal leadership characteristics are most important, for building successful buying or selling teams? Could you please answer them around 200 words?

  What are the various component use to build gui screen

What are the various component use to build Graphic User Interface(GUI) screen

  Change control management

Recommend strategies to enforce change control management.Appraise the advantages of having a change management board integrated by members from different functional teams or departments.

  Design a finite state machine similar to a 3 bit counter

design a finite state machine similar to a 3 bit counter. in this case you will have 3 bits of state which you can think of as a 3 bit unsigned number, but this time the counter must count by 3s--the sequence it goes through should be 0, 3, 6, 1, ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd