Question: C++ code Instructions: Write a program that asks a user to enter a date in month day year format (for example 10 12 2016) and

C++ code

 C++ code Instructions: Write a program that asks a user toenter a date in month day year format (for example 10 12

Instructions: Write a program that asks a user to enter a date in month day year format (for example 10 12 2016) and displays the day of the week for that date in this case, Wednesday Be sure to validate month and day to be sure they are in range. To validate 2/29/yyy, you will have to call the daLeapyeAK function. You will require several functions bool isteapearlint year); This function will return true if the year passed is a leap year and false if not. The pseudocode to determine if a given year is a leap year is: evenly divisible by 100)) int getCentuxyValuelint year) leapVear- ((year evenly divisible by 400) or {year evenly divisible by 4 and year NOT This function should take the first two digits of the year ( the century), divide by 4 and save the remainder. Subtract the remainder from 3, multiply the result by 2 and return that value. For example the year 2013 becomes (20/4): 5, remainder 0, 3-0 3 return 3 * 2- 6. Hint, to get the century divide by 100. This function computes a value based on the years since the beginning of the century First, extract the last two digits of the year (year%100), in this case 13, Next, factor in leap years. Divide the last two digits by 4 and add that back to the result and return that Eg (13/4) - 3. 3-13 16 int getMonthValue.(int month, int year) This function should return a value based on the table below and will require calling the isleapYear function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!