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]
3 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]3 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
Which type of chart is used to chart progress over time?
Morgarella [4.7K]

Answer: Timeline

Explanation:

6 0
3 years ago
Which one of the following is true about employer responsibility in providing fall protection to workers? not selected A. Employ
Luda [366]

Option B is the correct answer, Employers have flexibility in choosing a fall protection system they believe will work best in a situation selected. It is the primary duty of employer to provide safety to its workers. Employers must setup a suitable protection system at workplace from falling off from overhead platforms and from elevated workstations during construction for safety of its employees.  

Further Explanation:

⦁ Employer must ensure compliance to OSHA-Fall protection in construction.

⦁ Generally, fall protection must be ensured by deploying guardrail systems at the edge of construction sites, safety systems built by nets or personal fall arrest.

⦁ OSHA requires to built fall protection system irrespective of fall distance to make sure safety conditions for workers/ employees.

Answer details:

Grade: High School

Subject: Computer Science and Technology.

Learn More:

Fall protection and compliance to OSHA rules and regulations

brainly.com/question/8910167

Employer responsibility in providing fall protection

brainly.com/question/5872956

Key Words: Fall protection, OSHA, workplace safety, guardrail systems etc.

Image of guardrail as an example is attached.

5 0
3 years ago
Read 2 more answers
Can anyone do this flowchart chart for me could send it to my insta - chelsea.ejb
arlik [135]

Answer:

see attached picture

Explanation:

An algorithm would be:

if hours < 10 then bonus = 0

else if hours <= 15 then bonus = 1000

else if hours <= 20 then bonus = 1500

else if hours <= 25 then bonus = 2000

else if hours <= 30 then bonus = 3000

else bonus = 5000

6 0
3 years ago
In order, the three-step process of using a file in a C++ program involves
Anna71 [15]

Answer:

c. open the file, read/write/save data, close the file

Explanation:

8 0
3 years ago
What is land? Explain its features​
egoroff_w [7]

Answer:

Odd question but okay....

Explanation:

Earth's surface, also known as "Land", has very many biotic(animals) and abiotic factors (plants). There are also a wide variety of land features such as mountain, plains, Hills, etc..

Within these features are small - Large ecosystems we're plants and animals thrive to create a bigger and stronger wildlife.

"Land" is a very simple word that stands for all of the different plants, mammals, ecosystems, aquatic animals and many more ways of life on Land.

I hope this helps...

3 0
2 years ago
Other questions:
  • Question 2 (1 point)
    9·1 answer
  • how to write a function "void funct()" which will accept a string from the user as input and will then display the string backwa
    11·1 answer
  • Justin Blake and Raegan Beast anyone?? I miss Jaegan a ton and I need a fangirl to talk to.
    13·1 answer
  • Which of the following best describes a toolbar?
    7·1 answer
  • B) If you send me an email, then I will finish my program. If you do not send me an email, then I will go to sleep early. Theref
    10·1 answer
  • In a case where electrical current leakage from the circuit occurs, the GFCI would do the following:
    10·1 answer
  • When a partition is formatted with a file system and assigned a drive letter it is called a volume?
    10·1 answer
  • Hi All,
    12·2 answers
  • Command create database in oracle database ::((
    8·1 answer
  • (Java) Write a program that accepts a number of minutes and converts it both to hours and days. For example, 6000 minutes is 100
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!