Question: For this assignment, you are to write a C++ program which will: Have the User enter in a date. Calculate the day value of that
For this assignment, you are to write a C++ program which will: Have the User enter in a date. Calculate the "day value" of that date. For this you will need to write several functions as stated below. . . A function that determines if a year is a leap year. A function that determines the number of days in a month. Remember if the year is a leap year then February has 29 days. You will need the leap year function. This is an example of a function calling another function A function that determines the number of days in the year of the date in question. This function uses the days in month function. Based on the "day value" of the date, and the fact that January 1, 1900 was Monday, write another function that prints the day of the week that date fell on Ex. For 10/31/2000 you need to calculate the number of days from 01/01/1900 to 12/31/1999, and then calculate the days from 01/01/2000 to 10/31/2000. This will give you the "day value". Use a modulus 7 division on this day value to find the day of the week the date falls out on. Your input file will have at least twenty dates to process. You will read up to the end of file. Your program should print a line of code for each date to the console as follows: Tuesday 10/31/2000 has a day value of 36829
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
