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.

  1. Write a program that use three functions in C++.
    1. 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

  1. 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

  1. 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

  1. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!