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

  Compare tcp and udp protocols

)You suspect that the failure of a router or of a transmission line connecting routers has left some of your important servers unavailable to clients at your site. How could you narrow down the location of the problem?

  Using positive edge triggered t

Using positive edge triggered T flip flops, show the design of a modulo 7 asynchronous counter that counts 0,1...6,0, etc. You may assume that your flip flop

  How asymptotic notation can be used to rank the efficiency

To illustrate how asymptotic notation can be used to rank the efficiency of algorithms, use the relations "Ì" and "=" to put the orders of the following functions into a sequence, where e is an arbitrary real constant, 0

  Create a program called sum of numbers

Create a program called Sum of Numbers

  Database management systems

Database Management Systems

  Compute the average temperature for a month averaged

Complete the following program that has an array to store one month of hourly templerature readings. Assume each month is 30 days long. Rows represent days of the month and columns represent hours of the day.

  Relational database model

"Relational Database Model" Please respond to the following: In the Week 1 discussion, you identified one (1) example of a business function or operation and the business rules associated with that business function / operation. You will build upon t..

  Successful technological innovations

Many successful technological innovations originated in small start-up organizations, while others originated in large, well-established organizations. Successful technological innovations

  Identifying the risks associated with the current position

Be sure to add a conclusion with a rationale detailing how risks can be mitigated. Reference your research so that Sean may add or refine this report before submission to senior management.

  Use the random class to randomly fill array list1

Use the Random class to randomly fill array list1 and then copy that array to list2 and list3. Use of the int data type is preferred.

  Capacity as a systems analyst

In your capacity as a systems analyst, you may face situations in which you encounter an ethical dilemma. For example, you may be asked to design a system that supports an activity with which you personally disagree

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