(Square of Asterisks) Write a function that displays at the left margin of the screen a solid square of asterisks whose side is specified in integer parameter side. For example, if side is 4, the function displays the following:
****
****
****
****
What will be an ideal response?
```
// Displays a solid square of asterisks.
#include
using namespace std;
void square( int ); // function prototype
int main()
{
int side; // input side length
cout << "Enter side: ";
cin >> side;
cout << '\n';
square( side ); // display solid square of asterisks
cout << endl;
} // end main
// square displays solid square of asterisks with specified side
void square( int side )
{
// loop side times for number of rows
for ( int row = 1; row <= side; row++ )
{
// loop side times for number of columns
for ( int col = 1; col <= side; col++ )
cout << '*';
cout << '\n';
} // end for
} // end function square
```
You might also like to view...
________ store data magnetically on metal platters
A) Hard drives B) Flash drives C) CDs D) Blu-ray discs
In an Access option group, when an option button is selected, a T or an F is stored in the Access table
Indicate whether the statement is true or false
Explain calculated columns.
What will be an ideal response?
A _______ clause creates an equijoin between two tables using one column with the same name, regardless of the data type.
A) NATURAL JOIN B) ON C) USING D) EQUI-JOIN