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.