Question: Create a program that gets input from the month from the user as a number between 1 and 1 2 . Then use the function

Create a program that gets input from the month from the user as a number between 1 and 12.
Then use the function get_quarter to convert the month to quarter.
Use the return value to display the following message to the user, for example, if input is 1 :
Month 1 is in the first quarter
If the return value is "error" then display the following message:
The entered value is not a correct month.
Please enter a value between 1 and 12.
Here is a description of the get_quarter function:
Function get_quarter
\table[[Arguments (Input),Process,\table[[Return value],[(Output)]]],[\table[[month: integer value],[representing],[the month of the],[year where:],[1 is January and 12 is],[December]],\table[[Converts month into],[quarter],[based on the],[following:]],\table[[String],[representing],[the],[quarter or],[error]]],[\table[[Input],[Month]],\table[[Output],[Message]]],[1 to 3,\table[[first],[quarter]]],[4 to 6,\table[[second],[quarter]]],[7 to 9,\table[[third],[quarter]]],[10 to 12,\table[[fourth],[quarter]]],[\table[[Any],[other],[value]],error]]
 Create a program that gets input from the month from the

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!