answer.
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
lesya692 [45]
2 years ago
14

Write the prototype for a function named showSeatingChart that will accept the following two-dimensional array as an argument. c

onst int ROWS = 20; const int COLS = 40; string seatingChart[ROWS][COLS]; Note: The two-dimensional array argument must be a const string array. You must include a second integer argument (scalar, not an array).
Computers and Technology
1 answer:
barxatty [35]2 years ago
4 0

Answer:

See explaination

Explanation:

void showSeatingChart(string seatingChart[20][40], const int ROWS, const int COLS){

for(int i = 0;i<ROWS;i++){

for(int j = 0;j<COLS;j++){

cout<<seatingChart[i][j]<<" ";

}

cout<<endl;

}

}

You might be interested in
A computer has 4 GB of RAM of which the operating system occupies 512 MB. The processes are all 256 MB (for simplicity) and have
Afina-wow [57]

Answer:

1-p^{14} = 0.99

p^{14}= 0.01

p =(0.01)^{1/14}= 0.720

So then the value of the maximum I/O wait that can be tolerated is 0.720 or 72 %

Explanation:

Previous concepts

Input/output operations per second (IOPS, pronounced eye-ops) "is an input/output performance measurement used to characterize computer storage devices like hard disk drives (HDD)"

Solution to the problem

For this case since we have 4GB, but 512 MB are destinated to the operating system, we can begin finding the available RAM like this:

Available = 4096 MB - 512 MB = 3584 MB

Now we can find the maximum simultaneous process than can use with this:

\frac{3584 MB}{256 MB/proc}= 14 processes

And then we can find the maximum wait I/O that can be tolerated with the following formula:

1- p^{14}= rate

The expeonent for p = 14 since we got 14 simultaneous processes, and the rate for this case would be 99% or 0.99, if we solve for p we got:

1-p^{14} = 0.99

p^{14}= 0.01

p =(0.01)^{1/14}= 0.720

So then the value of the maximum I/O wait that can be tolerated is 0.720 or 72 %

3 0
1 year ago
In the Budget Details sheet, if you wish to autofill with the formula, you must use a ______ reference for the LY Spend Total ce
ahrayia [7]

Answer:

The answer is A.Absolute reference.

Explanation:

Absolute reference is a cell reference whose location remains constant when the formula is copied.

8 0
2 years ago
Allie is choosing a URL for her band’s website, which is the best method of making the URL easy to understand? creating a URL wi
gayaneshka [121]
URL stands for Uniform Resource Locator. It<span> identifies the location of a </span>file<span> on the internet and is used in order the </span><span>web browser to know where to look. </span><span>The entire address www.brainly.com is called the URL.</span><span>
The best method of making the URL easy to understand is creating humam-readable URL.</span>
7 0
1 year ago
Read 2 more answers
Write a loop that subtracts 1 from each element in lowerScores. If the element was already 0 or negative, assign 0 to the elemen
Xelga [282]

Answer:

The JAVA program to implement for loop for given scenario is shown below.

public class MyProgram {

   public static void main(String args[]) {    

     int len = 5;

     int[] lowerScores = new int[len];      

     lowerScores[0] = 5;

     lowerScores[1] = 0;

     lowerScores[2] = 2;

     lowerScores[3] = -3;      

     System.out.println("The original elements of array are ");

     for(int i=0; i<len; i++)

     {

         System.out.print(lowerScores[i]+" ");

     }      

     System.out.println();

     System.out.println("The modified elements of array are ");

     for(int i=0; i<len; i++)

     {

         // if element is 0 or negative, 0 is assigned to this index

         if(lowerScores[i] <= 0)

           lowerScores[i] = 0;

       // 1 is subtracted from every non zero and positive element

         else

           lowerScores[i] = lowerScores[i] - 1;

           

       System.out.print(lowerScores[i]+" ");

     }

   }

}

OUTPUT

The original elements of array are  

5 0 2 -3 0  

The modified elements of array are  

4 0 1 0 0

Explanation:

The integer array is declared as shown.

int[] lowerScores = new int[len];

The length of the array is given by integer variable len. As per the question, we have taken four elements and size of 5 for the given array.

int len = 5;

The elements of the array are initialized inside the program with the elements given in the question.

lowerScores[0] = 5;

      lowerScores[1] = 0;

The values of the array can be changed to test the program. Also, the size of the array can be changed for testing.

As per the given scenario, if the element is greater than zero, 1 is subtracted from this element. For elements less than or equal to zero, that particular element is assigned the value of 0.

The given program implements if else statement inside for loop for this purpose.

for(int i=0; i<len; i++)

     {

         // if element is 0 or negative, 0 is assigned to this index

         if(lowerScores[i] <= 0)

           lowerScores[i] = 0;

       // 1 is subtracted from every non zero and positive element

         else

           lowerScores[i] = lowerScores[i] - 1;

     }  

5 0
1 year ago
Read 2 more answers
1.Which of the following class definitions defines a legal abstract class?a. class A { abstract void unfinished() { } }b. class
xxMikexx [17]

Answer:(c) abstract class A { abstract void unfinished(); }

Explanation:

A legal abstract class must have the keyword abstract before the class and an abstract class has abstract functions with the keyword abstract written and a void as the return type.

8 0
2 years ago
Other questions:
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • Prove that any amount of postage greater than or equal to 64 cents can be obtained using only 5-cent and 17-cent stamps?
    15·1 answer
  • You are attempting to open a file containing a list of integer numbers, each on a separate line, and read them into Python as in
    6·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • You have been employed as a technical consultant to a computer shop chain. You are given the task of creating a short consumer b
    12·1 answer
  • Ana works in the medical records department at a large medical office. Her job includes scanning and uploading medical records i
    15·1 answer
  • A school principal trying to find out if parents will help buy new playground equipment shows digital leadership by.
    8·2 answers
  • Which of the following statements is true regarding input and output?
    12·2 answers
  • Write code which takes a sentence as an input from the user and then prints the length of the first word in that sentence.
    6·1 answer
  • Checkpoint 10.43 Write an interface named Nameable that specifies the following methods: _______{ public void setName(String n)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!