Can anyone help me with this program. I don't even know where to start with this one. I really want to learn this so I'm not looking for complete code, just some guidance to help this rookie through it.
I need to write a program that prompts the user for three integers representing the day, month, and year of a given date (e.g. 5 24 1994), and that displays the day of the week for the given date (e.g. 5/24/1994 is a Tuesday).
An algorithm, called Zeller’s algorithm, for determining the day of the week on which a given date falls goes by the following pseudo-code.
a) First, adjust the month and year:
move the month 2 places down; that is; if the month entered is not January or February, subtract 2 from it to get the adjusted month, and make the adjusted year the same as the given year;
if the month is January or February, the adjusted month is month 11 or 12 of the previous year, which is the adjusted year.
b) Second, compute a month correction M, which is (26 times the adjusted month) minus 2, divided by 10 (integer division).
c) Third, compute the century C (actually century minus 1) and year Y within the century for the adjusted year (so, for example, if the adjusted year is 1993, C will be 19 and Y will be 93).
d) Fourth, compute a year correction Z which is Y + (Y divided by 4) + (C divided by 4) + (5 times C).
Again, all division are integer divisions.
e) Finally, compute a code D for the day of the week for the given date. D is the remainder after division by 7 of the sum of the day, month correction M and year correction Z. Now, if D is 0, 1, 2, …6 then, the day of the week is Sunday, Monday, Tuesday, …, Saturday respectively.