lease complete the following function printBox, which accepts three parameters (i.e., char c, int length, int width), and must print a box (using the char c received) of length by width.
Please complete the following function printBox, which accepts three parameters (i.e., char c, int length, int width), and must print a box (using the char c received) of length by width.
**This is all i have so far. AREAS WITH "?????" are where I need help. Thank you!**
For example, the output of printBox('&', 4, 6) ;
will be as follows:
&&&&&&
&&&&&&
&&&&&&
&&&&&&
void printBox(char c, int length, int width)
// parameter 1: char c ( '&' for example) the char for the box
// parameter 2: int length ( 4 for example) like # of rows
// parameter 3: int width ( 6 for example) like # of columns
// Example: c = '&' ; length = 4 ; width = 6 ;
{ // begin printBox( )
?????Need help right here
} // end printBox( )
void main( ) // To test function printBox( )
{ printBox( '&', 4 , 6 ) ;
} // end main( )
The output of the above
&&&&&&
&&&&&&
&&&&&&
&&&&&&
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images