I'm new to C++ and currently enrolled in an intro class. Due to some uncontrollable events I have fallen behind in the class. Would appreciate help with the following:
CSIT 575 – Programming Fundamentals for Computer Science Lab #3A
To learn to code, compile and run a program containing SELECTION structures
A. Plan and code a C++ program utilizing the if-then-else structure to solve the following:
B. Write an interactive C++ program to determine the day of the week for any given date from 1900-2099. Following are the steps you should use:
C. Input the date in 3 separate parts, month, day and 4-digit year. Error check to make sure the month is between 1 and 12, the day between 1 and 31, and the year between 1900-2099. If there is an error, identify the type of error and stop the program.
D. If the data is good, divide the last two digits of the year by 4. Store the quotient (ignoring the remainder) in Total. For example, for 1983, divide 83 by 4 and store 20 in Total.
E. Add the last 2 digits of the year to Total.
F. Add the two digits of the day of the month to Total.
G. Using the following table, find the "value of the month" and add it to Total.
January = 1 May = 2 September = 6
February = 4 June = 5 October = 1
March = 4 July = 0 November = 4
April = 0 August = 3 December = 6
H. If the year is 2000 or later, add 6. If the year is 2000 exactly and the month is January or February, subtract 1.
I. Then, determine if the year is a leap year. A leap year is divisible by 4 but not divisible by 100. If it is a leap year and the month is January or February, subtract 1. (The year 2000 is NOT a leap year).
J. Find the remainder when the Total is divided by 7. Use the remainder to find the day: