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
How can i setup a mesage room and also want to hangout ??????
bixtya [17]

Answer:

no

Explanation:

4 0
2 years ago
(10 points) 5.12. Discuss how the following pairs of scheduling criteria conflict in certain settings. a. CPU utilization (effic
Novosadov [1.4K]

Answer:

Check the explanation

Explanation:

  1. CPU utilization and response time: CPU utilization is amplified if the overheads that are connected with context switching or alternating are minimized. The context switching outlay can be reduced by performing context switches occasionally. This could on the other hand lead to increasing the response time for processes.
  2. The Average turnaround time and maximum waiting time: Average turnaround time is reduced by implementing the shortest or simple tasks first. Such a scheduling and arrangement strategy could nevertheless starve long-running tasks and in so doing boost their overall waiting time.
  3. I/O device utilization and CPU utilization: CPU utilization is maximized by executing a list of long-running CPU-bound tasks not including the performing context switches. This is maximized by setting up I/O-bound tasks as early as they become ready to run, thus sustaining the overheads of context switches.

3 0
3 years ago
1. What does it mean to say that a country’s land area is positively correlated with its population?
disa [49]
For 1.
Positive correlation means if you plot a country's population and land size on a graph. There would be a linear regression line that's sloping upwards. 

Since it's a scatterplot, there will be some that fall out of the line, but most of them should be on the line.

It's  (A)

For 2.
An outlier is a datapoint that's far, FAR away from the others, so it's (B)

For 3. (A), it's a single line-of-best fit that runs through the middle of the cluster of data points.
5 0
3 years ago
Read 2 more answers
What type of device is characteristic of an enterprise environment?
Nitella [24]
A workstation used at an engineering firm.
8 0
3 years ago
What was the name of the first computer (machine) language?
Angelina_Jolie [31]

In 1957, the first of the major languages appeared in the form of FORTRAN. Its name stands for FORmula TRANslating system. The language was designed at IBM for scientific computing. The components were very simple, and provided the programmer with low-level access to the computers innards.


8 0
3 years ago
Read 2 more answers
Other questions:
  • How to eject a flash drive from chromebook?
    6·1 answer
  • Correspondence involves verbal communication. True False
    6·2 answers
  • Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching
    12·1 answer
  • It is illegal to have __________ emergency lights on your vehicle.
    6·2 answers
  • When I try to invite someone to be my friend on brainly, for some people, it says, "Somethings up. Invitation wasn't sent". Can
    8·1 answer
  • An example of creative curating is when a:
    9·1 answer
  • The data-mining technique that creates a report or visual representation is _____.
    13·1 answer
  • Please be my friend. my best and only friend isn't talking to me for some reason
    9·2 answers
  • Question<br> 1. Who was the first to use an abacus
    6·1 answer
  • What is ‘situational awareness” in game design?please answer in a full sentence!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!