Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss breakdowns in the negotiations process.

Answered: 1 week ago

Question

what is alphabet vision statment

Answered: 1 week ago

Question

2. What process will you put in place to address conflicts?

Answered: 1 week ago