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 and
Then use the function getquarter to convert the month to quarter.
Use the return value to display the following message to the user, for example, if input is :
Month 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 and
Here is a description of the getquarter function:
Function getquarter
tableArguments InputProcess,tableReturn valueOutputtablemonth: integer valuerepresentingthe month of theyear where: is January and isDecembertableConverts month intoquarterbased on thefollowing:tableStringrepresentingthequarter orerrortableInputMonthtableOutputMessage to tablefirstquarter to tablesecondquarter to tablethirdquarter to tablefourthquartertableAnyothervalueerror
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
