Question: Design a case structure that tests the month variable and does the following: If the month variable is set to 1, it displays January has

Design a case structure that tests the month variable and does the following:

  1. If the month variable is set to 1, it displays “January has 31 days.”
  2. If the month variable is set to 2, it displays “February has 28 days.”
  3. If the month variable is set to 3, it displays “March has 31 days.”
  4. If the month variable is set to anything else, it displays “Invalid selection.”

Step by Step Solution

3.42 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 Start 2 Input the value for the month variable 3 Case structure based on the value of the month va... View full answer

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 Starting Out With Programming Logic And Design Questions!