Question: Design an algorithm and then write a program that prompts the user to enter a month in number and a year, and displays the number

 Design an algorithm and then write a program that prompts the

Design an algorithm and then write a program that prompts the user to enter a month in number and a year, and displays the number of days in that month on the console. If the month is 2, your program should check if it is a leap year. In a leap year there are 29 days in February. Assume that the user will enter all the input correctly. For example, if the user entered month 2 and year 2020 , the program should display that February 2020 has 29 days. If the user entered month 3 and year 2020 , the program should display that March 2020 has 31 days. Use switch statement to check the month number. To check whether it is a leap year should be done under the case of month 2 only. CS.VS.928|

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!