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

  How many function evaluation does the genetic algorithm need

How many function evaluations does the genetic algorithm need? How many function evaluations does fmincon need?

  The prime address id being foreign

First last name using Zip code 56716 as the select statement.

  Name, number of years that he or she has worked

For each employee: name, number of years that he or she has worked for the company, whether or not they are interested in the new work position.

  What is the approximate limit of ram

Your computer at work is running a 32-bit version of Windows XP. What is the approximate limit of RAM your machine can effectively use?

  Developed a blackjack game to read

Developed a Blackjack game to read/print the hint table as it was laid out in the hint text file via console mode.

  2s complement representation

How would you take a decimal number and make it a word-length 2's complement representation?

  Compose a program that prints a well-formatted

Compose a program that prints a well-formatted calendar for a specified month

  Advantages of using new technologies in training

List and detail several advantages of using new technologies in training and development

  Compare computerized process to manual process

ompare a computerized process to manual process. Write differences and the advantages and disadvantages of the computerized systems.

  Html5 can validate weather an email address true or false

HTML5 can validate weather an email address entered by the user actually exists. True or False

  Explaining social network widgets and resaurant locators

The popularity of Apple's iPhone and Application store has made _____ improtant to advertisers, who see social network widgets, resaurant locators.

  Asks a user to enter the radius of a circle

Write a program that asks a user to enter the radius of a circle, and calcualtes the area and the circumference. The program should be written using the following methods.

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