Question: how can i fix my program to output more than 7 days. here is what its suppsed to be and here is what I have

how can i fix my program to output more than 7 days. here is what its suppsed to be and here is what I have , programming language is C++
how can i fix my program to output more than 7 days.
here is what its suppsed to be and here is what I
have , programming language is C++ Problem 2: Find the Day of
the Week [20] Write a program that will calculate the day of
the week for any date between September 4, 1752 and Dec 31,
2399. To find the day of the week you first must determine

Problem 2: Find the Day of the Week [20] Write a program that will calculate the day of the week for any date between September 4, 1752 and Dec 31, 2399. To find the day of the week you first must determine whether the year was a leap year. In general, if a year is evenly divisible by 4, it is a leap year. However, there are exceptions Century years, such as 1800 and 1900, are not leap years, despite the fact that they are divisible by 4. Furthermore, as an exception to the exception, a century year that is divisible by 400 (such as the year 2000) is a leap year. The algorithm for finding the day of the week requires several key numbers that can be obtained from the following tables. Month Key Jan 1 (0 if Leap Year Feb 4 (3 if Leap Year) Mar 4. Apr May Jun 3 Month Jul Aug Sep Oct Nov Dec 0 3 6 Day Key Sat 0 Sun 1 Mon 2 Century Kev 1700s 1800s 2 1900s 20005 6 21008 22005 2 23008 olc Tue 3 Wed 4 Thr 5 Fri 6 tico to 4 The algorithm works as follows: (We will use December 7, 1941, as an example) Step 1: obtain the following 5 numbers 1) The last two digits of the year 41 2) The number from step 1 divided by 4 (ignore remainder) 10 3) The month key (find from the table) 6 4) The day of the month 5) The century key (find from the table) 0 Step 2: add the five numbers 64 Step 3: divide the sun by and keep the rereainder 647-9 T! Step 4: Find the retninder in the day key table to find the day of the week Sample Output: Enter the day 1 - 31.): 7 Enter the month (1 - 12): 12 Enter the year 1752 - 2399) 1941 That day is Sunday. Required Test Cases: 5, 10, 1957 151200 15. 1. 2001 15) 1. 2004 p* X (Global Scope) W Include sect.cn #include using namespace std; gint main() { int month = 0; int year = 0; int days = 31; int dayofWeek=31; string stringMonth = ""; cout > dayofWeek; cout > month; cout > year; switch (month) { case 1: 7/31 days stringMonth = "January"; break; 3 4 5 5 7 8 case 2: 1/determine if Febuary is a leap year stringMonth = "Febuary": if ((year % 100 -- @) a& (year % 400 == 0) 11 (year $ 4 =- 0)) days = 29; else days - 28; 30 31 32 33 break; 35 36 B2 GE case 3: 1/31 days stwo March SD NO und Output Cybe here to get MANN break; 55 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 case 3: 7131 days stringMonth = "March"; break; case 4: 1/38 days stringMonth = "April"; days 30; break; case 5: 1/31 days stringMonth = "May"; break; case 6: 1/30 days stringMonth = "June"; days = 30; break; case 7: 1/31 days stringMonth "July"; break; case 8: 1/31 days stringMonth - "August"; break; case 9: 1/30 days stringMonth - "September"; days 30; break; case 10: 1/31 days stringMonth - "October"; break; No issues found 67 68 69 70 89 % Ready Output (Global Scor 30; break; case 9: 38 das stringMonth = "September"; days break; case 10: 7/31 days stringMonth = "October"; break; case 11: 1/30 days stringMonth = "November"; days = 30; break; case 12: 1/31 days stringMonth = "December"; break; switch (dayofweek) { case 1: cout

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!