Question: C++ code using void functions Complete the program shown below. Note : do not omit the comments You will write a void function to get
C++ code
using void functions
Complete the program shown below. Note: do not omit the comments
- You will write a void function to get a positive integer between 1 and 12 inclusive. The twelve numbers represent the months of the year. The user will be asked to enter an integer between 1 and 12 inclusive. If the number entered by the user is not within range, an appropriate error message will be displayed, and the user will be asked to try again until a valid number is entered.
- You will write a void function to print the month number and the month name with an appropriate message. Consider a good layout when displaying the output.
- You will also complete the function main by making a call to the function GetMonthNumber with an appropriate argument and by making a call to the function DisplayMonth with an appropriate argument
- Add a loop to allow the program to repeat, allowing the user to continue. Consider proper indentation and alignment of the statements.
- Output your name as well before the program ends.
// Purpose: To get a month number between 1 and 12 inclusive and print the month number and the corresponding month name. // This part to be completed #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
