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
Liza works as a receptionist. Around the lunch hour, she has a difficult time hearing the callers due to employees talking near
Rashid [163]
c.<span>barriers to communication
 because the other employees are the ones causing the trouble</span>
6 0
2 years ago
Intellectual ______ is the legal term for ownership of intangible assets such as ideas, art, music, movies, and software.
SOVA2 [1]

Answer:

<u>Property</u>

Explanation:

Intellectual Property (IP) is the lawful protection of human idea/intellect by unauthorised users. These human intellects are intangible assets that have both moral and commercial value. They include ideas, art, music, movies, software e.t.c.

Common types of Intellectual property include

  • Copyrights
  • patents
  • Trade Marks
  • Trade Secrets
5 0
2 years ago
Read 2 more answers
List of bad websites and why
r-ruslan [8.4K]

Penny Juice – bad design examples.

Blinkee website – bad design example.

Great Dreams I — bad designed website.
8 0
2 years ago
Which is currently the most common cellular network?<br> 4G<br> 4G LTE<br> 5G<br> 5G LTE
Misha Larkins [42]

Answer:

4GLte

Explanation:

8 0
2 years ago
An example of a(n) ____ reconnaissance attack is a user who sends SQL injections to a system in hopes of generating some type of
Elden [556K]
The answer to this question is A
7 0
2 years ago
Read 2 more answers
Other questions:
  • Your bank offers to lend you $114,400 at an 8.5% annual interest rate to start your new business. The terms require you to amort
    11·1 answer
  • List and the deference between MS access objects​
    8·1 answer
  • The most popular way for hackers to take over hosts today is ________.
    15·2 answers
  • Which type of function distill the information contained within a file (small or large) into a single fixed-length number, typic
    14·1 answer
  • 1024 Megabytes = ____________
    14·1 answer
  • 120
    14·1 answer
  • Project: big research project
    15·2 answers
  • Indica si los elementos de las imagenes son una materia prima o un material elaborado
    12·1 answer
  • Please HELP me it a test and it due rn. Please no links
    9·1 answer
  • Pleaseeeeeeee tellllllllllllllllllllll​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!