Question: Write a program that prompts the user to enter the month and year and displays the number of days in the month. Must use a

Write a program that prompts the user to enter the month and year and displays the number of days in the month. Must use a finite loop, switch statement, and read input from .txt file.

Sample output,

Spring 2018 Project 4 Due date by Your Name

Year 2016 and month 02 has 29 days

Year 2019 and month 09 has 30 days

Year 2020 and month 04 has 30 days

Year 1945 has invalid month 13

Year 1998 and month 08 has 31 days

Year 2018 and month 12 has 31 days

End of Month/Day program

2 2016

9 2019

4 2020

13 1945

8 1998

12 2018

Sample input for the above output.

Finite loop:

for(int k =0; k < 6; k++)

{

Body of the loop

}

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!