using void functions 1. Complete the program shown below. Note: do not omit the comments a) 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. b) 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. c) 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 d) Add a loop to allow the program to repeat, allowing the user to continue. Consider proper indentation and alignment of the statements. e) Output your name as well before the program ends. f) Test the functions using different test data. Show several examples to show that the program performs validation check as well. Write the documentation and include the screenshots.
using void functions 1. Complete the
![//prompt user to enter number and read the number
cout <« "Enter a number between 1 and 12 inclusive: ":
cin >>
//while number entered is not between
//between 1 and 12
// inclusive
while
{
cout « number « " is not between 1 and 12 inclusive. \n";
cout « "Try again. Enter a number between 1 and 12: ";
// read the next number
}
//*******************
// Definition of function DisplayMonth.
// The parameter number holds an integer between 1 and 12 inclusive
// representing a month number.
// The function displays the month number and the corresponding month name.
**********
//***********
****************************
**************
void DisplayMonth (_](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F374dbd4c-1ebf-41a4-9805-51e520760e63%2F3eb822cf-91f6-484e-9f25-1be0ac915b82%2F9lqpqa_processed.png&w=3840&q=75)
![// Purpose:
To get a month number betveen 1 and 12 inclusive and
print the month number and the corresponding month name.
II This part to be completed
//---
//tor using cin and cout
include <iostream>
using namespace std:
// Function Prototypes
void GetMonthMamber (ints):
void Displaytonth (int) :
int main()
int monthilum:
//a number representing a month
GetMonthlunber L
): 1/get a month number
//call function to output the month number
// and month name
systen (pause":
return 0:
// Definition of function GetMonthliumber.
// The parameter number is a reference parameter to an int.
I/ The funetion asks the user to enter an integer betveen 1 and 12 inclusive.
// It the number entered is not within range, an error message will be
// displayed, and the user will be asked to try again until a valid nunber is
// entered.
.......
void GetMonthlumber(
//nunber representing month nunber
//prompt uaer to enter number and read the number
cout « "Enter a number betveen 1 and 12 inclusive: ":
cin >>
I/hile nunber entered 1s not betveen
) //betveen 1 and 12
// inclusive
while
cout « nunber <«- is not between 1 and 12 inclusive. \n":
cout ce Try again. Enter a nunber betveen 1 and 12: ":
// read the next number](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F374dbd4c-1ebf-41a4-9805-51e520760e63%2F3eb822cf-91f6-484e-9f25-1be0ac915b82%2Fmecftud_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)