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
Messages that have been accessed or viewed in the Reading pane are automatically marked in Outlook and the message subject is no
vivado [14]

Answer:

Mark as Unread

Explanation:

I just know

5 0
3 years ago
Read 2 more answers
How is a cell named?
tankabanditka [31]
Hi,

I believe your speaking of cells in according to software, like Excel. 

If so, each cell is identified by its column letter and row number.

Faith xoxo
6 0
3 years ago
Read 2 more answers
What happens in Word 2016 when the Home ribbon tab is clicked on? A dialog box is launched, containing functions relating to the
ArbitrLikvidat [17]

A group with functions relating to font and tables will open.

3 0
3 years ago
Read 2 more answers
Wireless displays connect to a computer using a wireless networking connection such as wi-fi or ____.
Semmy [17]
Wireless displays connect to a computer using a wireless networking connection such as wi-fi or Bluetooth
7 0
3 years ago
Hy does a bus network need regular hubs if it is to cover very much ground?
Norma-Jean [14]
A bus network can only accommodate a number connections and a limited area. If there were more hubs connected to the bus network, the coverage of the network would be expanded and the number of connections will also be increased.
7 0
3 years ago
Other questions:
  • Why would you not restore a Domain Controller that was last backed up twelve months ago
    9·1 answer
  • You type the word "weather" when you meant to type "whether". When will Microsoft Writer or Microsoft Word flag this as a misspe
    11·2 answers
  • a problem-solving approach that requires defining the scope of a system, dividing it into its components, and then identifying a
    8·1 answer
  • Give me 3 companies that utilize audio/video technology
    8·1 answer
  • Maureen downloads three pictures of cabin sizes for her siblings to vote on. She inserts one picture per slide. The third pictur
    10·1 answer
  • Of the key reasons for creating organizational units which of the following is not one of them?
    13·1 answer
  • Two or more computers connected together is referred to as a(n)
    15·1 answer
  • I am not a living being, I am a cylindrical shape that has three to eight sides. I never die. I can build anything again. What i
    5·1 answer
  • Identify the selector in the following CSS code:
    10·1 answer
  • Edhesive code practice 6.3
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!