Question: Requirements: Create a program that gets input from the month from the user as a number between 1 and 1 2 . Then use the
Requirements:
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,Return value Outputtablemonth: integer value representingthe month of the year where: is January and is DecembertableConverts month into quarterbased on the following:tableString representing thequarter or errorInput Month,Output Message to first quarter to second quarter to third quarter to fourth quarterAny other valu,eerror
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
