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
While traveling in India, Sabina notes all of her daily expenses in rupees in her spreadsheet. At the end of the day, she wants
Contact [7]
Use currency conversion dialog box select rupee to us dollar
8 0
3 years ago
2. When was the Antikythera mechanism discovered? What year? <br>​
Vlad [161]

Answer: 1901

Explanation:

7 0
3 years ago
Read 2 more answers
Send a newsletter when you want to communicate directions, advice, or information.
lilavasa [31]
True, since you do want to give out information
4 0
3 years ago
Read 2 more answers
What is the purpose of installing updates on your computer?
Lostsunrise [7]

The purpose of adding updates to your computer are as follows:

  • Making sure your computer hardware can run the newest software programs
  • Ensuring the built-in virus protection software is up to date
  • Removing bugs and glitches from your operating system
  • Allowing your computer to run as fast as possible
4 0
2 years ago
Which is the term for a computer typically located in an area with limited security and loaded with software and data files that
otez555 [7]
Sorry..................
8 0
3 years ago
Other questions:
  • What's a qat on a computer
    12·2 answers
  • _____ software is used to play, create, and modify audio and video files.
    6·1 answer
  • Suppose x = 10 and y = 20. The value of the expression
    11·1 answer
  • Tom is required to present the activities of his Nature club each month to the school committee. Which presentation element can
    12·2 answers
  • Passwords are usually alphanumeric and usually cannot contain spaces or ________.
    10·2 answers
  • The automatic number of worksheets that appear when you open a blank Excel workbook is ? 1.One 2.Three 3.Six 4.Ten
    8·1 answer
  • Which is a good way to improve your credit score
    5·1 answer
  • James would like to send a document he has saved on the hard drive to coworkers in Ireland, Brazil, and India. These coworkers h
    6·2 answers
  • Which category does this fall in identity theft​
    6·1 answer
  • What is the difference between Packaged and tailored soft ware?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!