1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tino4ka555 [31]
2 years ago
9

3. Write a method squareOfAsterisks that displays a solid square (the same number of rows and columns) of asterisks whose side i

s specified in integer parameter side. For example, if side is 4, the method should display **** **** **** **** Incorporate this method into an application that reads an integer value for side from the user and outputs the asterisks with the squareOfAsterisks method.
Computers and Technology
1 answer:
iren2701 [21]2 years ago
8 0

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

void squareOfAsterisks(int x) //defining method squareOfAsterisks

{

   int i,j; //defining integer variable

   for(i=1;i<=x;i++) //defining loop to print column value

   {

   for(j=1;j<=x;j++) //defining loop to print row value

   {

   cout<<"*"; //print value

   }

   cout<<endl; //for line break

   }

}

int main() //defining main method

{

int x; //defining integer variable

cout<<"Enter any number: "; //print message

cin>>x; //input value from user

squareOfAsterisks(x); //calling the method and pass the value

return 0;

}

Output:

Enter any number: 4

****

****

****

****

Explanation:

The description of the above program can be given as follows:

  • In the given program a method "squareOfAsterisks" is declared, that accepts an integer value "x" in its arguments, inside the method two integer variable I, j is used, that uses a to print the given pattern.
  • In the main method, an integer variable x is declared, which takes input from the user end, and then calls the method, that is "squareOfAsterisks" and passes its value.
You might be interested in
Consider this binary search tree:______.
Nitella [24]

Answer:

The new root will be 2.

<em></em>

Explanation:

The binary tree is not properly presented (See attachment)

To answer this; first, we need to order the nodes of the tree in a pre-order traversal.

We use pre-order because the question says if something is removed from the left child.

So, the nodes in pre-order form is: 14, 2, 1, 5, 4, 16.

The root of the binary tree is 14 and if 14 is removed, the next is 2.

<em>Hence, the new root will be 2.</em>

7 0
2 years ago
Directory services store information in a heirarchical structure. Which statements about Organizational Units (OUs) of a directo
NeX [460]

Answer:B

Explanation:

Specific files within an OUs or container are called object.

5 0
3 years ago
_____________ describes the abstraction of web-based computers, resources, and services that system developers can utilize to im
Vika [28.1K]

Answer:

c. Cloud computing

Explanation:

Cloud computing -

It refers to the on - time need of the computer resource , in order to store data , computing power by the user , is referred to as cloud computing.

It refers to the availability of the data centers to the user .

This method enables the sharing of resources .

Hence, from the information of the question,

The correct option is c. Cloud computing .

6 0
3 years ago
(ANSWER!)
andreev551 [17]

Answer:

it doesn't? maybe it helps by resetting it but other than that I don't think It does anything

4 0
3 years ago
Read 2 more answers
71 81 77 15 63 96 36 51 77 18 17
sp2606 [1]

Answer:

Following are the solution to this question:

Explanation:

This algorithm uses the divide and rule approach works, which splits the list into two sublists depending on if they are smaller or larger than the pivotal factor. It has O(n*log n) complexity.

It splits down the list in more than one version frequently till every sublist becomes based on a single element and fuses it to offer an ordered array. The merge type works according. It has O(n*log n) complexity.

Please find the attachment file of the sorting.

4 0
3 years ago
Other questions:
  • Candace opened an email from a person she didn't know and clicked on a pop-up in the email that installed a virus on her compute
    8·2 answers
  • You are given a network of 10.50.24.0/21, which contains 2,048 addresses. what subnet mask should you use to divide this into fo
    7·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • Which of the following is most accurate?
    10·1 answer
  • Cotización de un software
    12·1 answer
  • .- Una tienda de vestidos de fiesta, ofrece un descuento a las personas
    15·1 answer
  • WAP to find area of circle​
    12·1 answer
  • A customer wants to increase his storage capacity by 25gb
    7·1 answer
  • You are trying to sell a new product to a store owner. Which method of presentation
    10·1 answer
  • Which tab do you open to access the Comments feature?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!