Question: I am having some trouble on my c++ assignment and I would really appreciate some assistance on this problem, please leave your comments as comments.

I am having some trouble on my c++ assignment and I would really appreciate some assistance on this problem, please leave your comments as \\comments. Thanks a lot!

The entire problem + other useful info is on the screenshots below.

I am having some trouble on my c++ assignment and I would

really appreciate some assistance on this problem, please leave your comments as

(what I have so far...)

#include

using namespace std;

int main () {

int month;

int date;

int year;

cout

cout

cin >> month;

cout

cin >> date;

cout

cin >> year;

}

thanks again.

Your task is to write a program that asks the user to enter a date (e.g. July 4, 2008 could be entered as 7 4 2008) and your program will return the day of the week that corresponds to that date. Your program should take the input in numeric form, thus the input prompt should be as follows: Please enter a date below: Enter month (1-12) Enter day (1-31) Enter year (0000-9999) The following algorithm is from http://en.wikipedia.org/wiki/Calculating the day of the week The implementation will require several functions: bool isteaRYeauliat year) This function should return true if year is a leap year and false if it is not. Here is pseudocode to determine a leap year: leap.eac= ((year divisible by 400) or (year divisible by 4 and year not divisible by 100)) This function should take the first two digits of the year (i.e. the century), divide by 4, and save the remainder. Subtract the remainder from 3 and return this value multiplied by 2. For example, the year 2008 becomes: (20/4) 5 remainder 03-0 3 . Return 3 * 2 = 6 This function computes a value based on the years since the beginning of the century. First, extract the last two digits of the year. For example, 08 is extracted for 2008. Next, factor in leap years. Divide the value from the previous step by 4 and discard the remainder. Add the two results together and return this value. For example, from 2008 we extract 08. Then (8/4) 2 remainder 0. Return 2 8 10

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!