Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions