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
snow_lady [41]
3 years ago
11

Given that arrayIntValues [MAX_ROWS][MAX_COLUMNS] is a 2 dimensional array of positive integers, write a C++ function howManyEve

n to find the total number of even elements in the array. It should have input parameter array arrayIntValues. The function should return an integer.

Computers and Technology
1 answer:
skelet666 [1.2K]3 years ago
3 0

Answer:

Follows are the method definition to this question:

int even(int A[MAX_ROWS][MAX_COLUMNS], int length,int width)//defining a method even,that accept 2D array and two integer variables  

{

int E_num = 0;//defining an integer variable E_num that holds a vlue 0

for (int i = 0; i < length; ++i)//declare for loop for row count

{

for (int j = 0; j < width; ++j)//declare for loop for column count

{

if(A[i][j]%2 == 0 )//use if block that check even number in array  

{

E_num++;//incrementing the value of E_num  

}

}

}

return E_num;//return E_num value

}

Explanation:

In the above code, a method "even" is defined, which accepts a 2D array "A" and two integers " length and width" in its parameter.

Inside the method, an integer variable "E_num" is defined that uses two for loop and an if block for the count the even numbers which are available on the 2D array.

please find the attahced file for method ouput.  

You might be interested in
To obtain the desired speedup, make sure your new function recursively calls itself no more than once in the body of the method.
sertanlavr [38]

Answer:

the answer is going to be a. true

8 0
3 years ago
The fundamental difference between a switch and a router is that a switch belongs only to its local network and a router belongs
Alla [95]

Answer:

The answer is True

Explanation:

Switches are responsible for connecting computers within a network and it belongs only to its local network. Its responsibility is to filter and forward packets between LAN segments. They operate on layer two (2) and sometime layer three (3) of the OSI Model.

Routers on the other hand, are responsible for the interconnections of two or more networks. They forward data packets between networks. They reside at gateways, exactly where two or more networks connects. And they use communication protocols to effectively and efficiently communicate among two or more host.

7 0
2 years ago
Formatting can be applied to
valkas [14]
Formatting can maybe be applied to software works
8 0
2 years ago
Read 2 more answers
Here is the model I’m working on and can’t figure it out this model shows the basic process of making a protein what are the str
kolbaska11 [484]

It  does look like a model

Hope it helps I mean just my opinion.

8 0
2 years ago
Read 2 more answers
A(n) _____ is a flexible tool used to analyze data using reports that do not have a predetermined format.
Mandarinka [93]

Answer:

decision support system

Explanation:

4 0
2 years ago
Other questions:
  • What role do you think mobile devices have played in shaping the world?
    13·1 answer
  • When using a template to compose a memorandum which key on the keyboard moves the cursor to the next field
    15·1 answer
  • HURRY!! Ill give brainily and 25 points. Describe how Scent is related to the culture and historical period when it was created.
    15·1 answer
  • Give me 3 facts and 3 opinions
    5·1 answer
  • All of the following are advantages of database-stored information, except ______________. Multiple Choice
    7·1 answer
  • All dogs = 199999990158161231
    11·2 answers
  • HELP AASAP BRAINLIEST JUST HELP
    13·1 answer
  • Who was the father of computer​
    10·1 answer
  • What is the definition of a nested function?
    8·1 answer
  • Jonah wants to type an assignment using Word. Arrange the steps he needs to follow in the correct order.?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!