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
What is network topology? PLZZZ HURRY
Mashcka [7]

Answer:

Network topology is the arrangement of the elements (links, nodes, etc.) of a communication network. Network topology can be used to define or describe the arrangement of various types of telecommunication networks, including command and control radio networks, industrial field busses and computer networks.

7 0
3 years ago
In Scheme, the form (symbol-length? 'James) will return: Group of answer choices 0 5 6 error message
Nadya [2.5K]

Answer:

an error message

Explanation:

The return value is the value which is sent back by the function to a place in the code from where the \text{function} was called from. Its main work is to return a value form the function.

In the context, the form of  "(symbol-length? 'James)" in Scheme will return the  value --- ' an error message'.

7 0
2 years ago
A semiconductor kit is used on a
iragen [17]

The correct answer is PSC motor.

If you need more help, you can check on quizlet, I learnt about ecd from there lol

5 0
3 years ago
Assume a program requires the execution of 50 x 106 (50e6) FP instructions, 110 x 106 (110e6) INT instructions, 80 x 106 (80e6)
tresset_1 [31]

Answer:I really don’t know

Explanation:

Um You can look it up though

7 0
3 years ago
Consider the following line of code: price= input(Please enter the price: ") What would be the next line in your code that will
hodyreva [135]

Answer:

price float(price)

Explanation:

There are four basic type of data type use in the programming to declare the

variable.

1. int:  it is used for integer values.

2. float:  it is used for decimal values.

3. char:  it is used for character values

4. Boolean: it is used for true or false.

in the question, the one option contain the data type float (price float(price)). So, it store the value in decimal.

price int(price):  it store the value in integer.

price decimal(price):  it is wrong declaration of variable. their is no data type in the programming which name is decimal.

price price(decimal):  it is wrong declaration of variable. their is no data type in the programming which name is price.

6 0
3 years ago
Other questions:
  • What is one concern associated with web-based applications?
    12·1 answer
  • "a terminal has two input queues." as a user types each character to the terminal, it is collected in the ____ queue.
    5·1 answer
  • Give 2 examples of when spreadsheets are used.
    15·1 answer
  • Which word processing file that contains text and other
    13·2 answers
  • Manuel has set up his network so that some employees can open and view files but are unable to edit them. Others can open, view,
    10·1 answer
  • which of the following cells can't be recarged? A. Electrode cell B. wet cell C. primary cell D. storage cell
    13·1 answer
  • What is episodic memory? knowledge about words, concepts, and language-based knowledge and facts information about events we hav
    10·1 answer
  • Select the correct answer
    5·2 answers
  • Help my sister with social studies plssssss its about presidents!!
    9·2 answers
  • I need the answers. i don’t get this
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!