Question: Write a program that prompts the user for a month of the year as an integer, such that January is 1 , February is 2

Write a program that prompts the user for a month of the year as an integer, such that January is 1, February is 2... December is 12. The program will print the quarter of the year that the month belongs to: First quarter: 1-3; Second quarter: 4-6; Third quarter: 7-9; Fourth quarter: 10-12. It should print "The month belongs to quarter". Use a Switch statement with "break" and "default".

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 Programming Questions!