Question
Write a program that use three functions in C++. int GetRow(); //Function Name: GetRow //Purpose: This function will prompt the user for a row count.
- Write a program that use three functions in C++.
- int GetRow();
//Function Name: GetRow
//Purpose: This function will prompt the user for a row count. The function should validate the row // is greater than 0 and less than 21(data validation loop)
//Return Value: integer representing the row
//Incoming Parameter: N/A
//Outgoing Parameter: N/A
- int GetCol();
//Function Name: GetCol
//Purpose: This function will prompt the user for a column count. The function should validate the
// column is greater than 0 and less than 21 (data validation loop) //Return Value: integer representing the column
//Incoming Parameter: N/A
//Outgoing Parameter: N/A
- void PrintRectangle(int row, int col);
//Function Name: PrintRectangle
//Purpose: This function will take in as parameters from the calling function row and column counts
// and print a rectangle of Xs given the dimensions
//Return Value: N/A
//Incoming Parameters: row and column count
//Outgoing Parameter: N/A
- int main()
Your main program is now the driver of your program. Your driver should make use of the functions above in order to input rows and columns and output the rectangles until the user wishes to stop the process.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started