Question: Task: Write a simple program based on the use of IF, ELSE IF, ELSE with multiple conditions statements to show the number of days in

 Task: Write a simple program based on the use of IF,

Task: Write a simple program based on the use of IF, ELSE IF, ELSE with multiple conditions statements to show the number of days in each month. You need to ask the user to enter the number of the month (ie 1,2,3,4,... 12) and based on that you need to output the result as following: The number of days for month name of the month) is 30. Or The number of days for month (name of the month) is 31. Or The number of days for month (name of the month) is 28. Or In case the user entered a number other than 1 - 12 The program should display: Not a valid number! Remember: Jan, March, May, July, August, October and December have 31 Days April, June, September and November have 30 days February has 28 Days

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!