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
sasho [114]
3 years ago
15

Write a method named matrixAdd that accepts a pair of two-dimensional arrays of integers as parameters, treats the arrays as 2D

matrices and adds them, returning the result. The sum of two matrices A and B is a matrix C where for every row i and column j, Cij = Aij + Bij. You may assume that the arrays passed as parameters have the same dimensions.
Computers and Technology
1 answer:
Stella [2.4K]3 years ago
7 0

Answer:

The code to this question can be given as follows:

Code:

int matrixAdd(int[][] a, int[][] b) //defining method matrixAdd

{

int c[x][y]=0;//defining variable  

   for(int x = 0; x<a.length; x++)  //loop for add rows

   {

       for(int y= 0; y<a[i].length; y++) //loop for add column

       {

           int c[x][y] = a[x][y] + b[x][y]; //add array elements

       }

   }

  return c[x][y];//return value

}

Explanation:

In the above method definition code, a method "matrixAdd" is defined that contains two integer 2D arrays "a[][] and b[][]" in its parameter, and this function returns the sum of both array.

  • Inside this method, another integer 2D array "c[][]" is defined that contains nothing.
  • To add all array elements the for loop is defined, which uses the array variable "c[][]" to add all array elements and return its value.

You might be interested in
Communication between a computer and a keyboard involves ______________ transmission.
4vir4ik [10]

Answer:

Simplex transmission

Explanation:

Communication between computer and keyboard involves which transmission? Answer: Simplex transmission requires communicating between a computer and a keyboard. The simple transmission & communication channel allows data from only one direction.

8 0
2 years ago
A firewall relies on or a that determine what traffic should or should not be allowed to pass through
likoan [24]
A firewall determines what external network traffic(internet) should or should not be allowed to pass internal network(computer). A firewall is network security that protects software and hardware from untrusted sites that may have viruses, worms, and bugs that are detrimental to the computer.
5 0
3 years ago
Which device allows your computer to talk to other computers over a telephone line as well as access the internet?
Sphinxa [80]

This question has 2 answers that I can see.

The first one would be a Dial Up Modem. These devices allow (or allowed, since they're pretty much obsolete) a computer to communicate over the phone lines and access the internet.

The second option for an answer would be a DSL Modem/Router. In a sense, a DSL (Standing for Digital Service Line) is a bit of a predecessor to traditional Dial Up, using a digital telephone line (However not the frequencies used for voice) to connect a computer or set of computers together and to the internet.

7 0
3 years ago
if you upgrade your memory but notice the RAM count does not reflect the additional memory, what should you do ?
alisha [4.7K]

Try looking at your motherboard manual to see which dimm slots should be used first since putting memory in any slot could break the dual channel. Not giving your motherboard access to that ram. Or you probably used wrong memory since your memory has to be the exact same size and speed and type. Because 8gb ddr3 will not work with 8gb ddr4. 8gb ddr4 2400 MHz will also not work with 8gb ddr4 3200 MHz. And 8gb 3200 Mhz would not work with 16Gb 3200 mhz. Your ram should have the exact same specs.

3 0
4 years ago
. <br> It matters if you capitalize your search words in a search engine<br> True<br> False
Natasha2012 [34]

Answer:

false

Explanation:

search engines really don't care. they'll find the answer almost always whether or not you capitalize things

5 0
3 years ago
Other questions:
  • Write a C++ program that prompt the user to enter three points (x1, y1), (x2, y2), (x3,y3) of a triangle and
    14·1 answer
  • The ticketing system at the airport is broken, and passengers have lined up to board the plane in the incorrect order. This line
    8·1 answer
  • Write the definition of a function printLarger, which has two int parameters and returns nothing. The function prints the larger
    7·1 answer
  • If the speakers are not working on a laptop, what could be the problem besides the speakers?
    5·1 answer
  • C++ Language Use functions to solve all problems in the mentioned assignment
    12·1 answer
  • What is the purpose of a forecast worksheet?
    15·1 answer
  • How do you move a slide to another location in you your<br> presentation?
    7·1 answer
  • Place the steps in order for adding an additional email account in outlook
    12·1 answer
  • Which of the following could be part of an algorithm?
    11·1 answer
  • write the few lines of code that prompts the user to enter a series of exam scores, stopping when the user has entered an exam s
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!