Question: please help me i need to see how its done to understand fully. Program 1 Given that arrayIntValues [MAX_ROWS][MAX_COLUMNS] is a 2 dimensional array of
Program 1 Given that arrayIntValues [MAX_ROWS][MAX_COLUMNS] is a 2 dimensional array of positive integers, write a C++ function howManyEven to find the total number of even elements in the array. It should have input parameter array arrayIntValues. The function should return an integer. Also create a C++ subroutine called printArray with the input parameter array arrayIntValues to print out the elements in the array (be sure to have row and column labels and proper formatting (i.e. column values line up?) The constants MAX_ROWS and MAX_COLUMNS must be accessed globally by defining the following global variables: #define MAX_ROWS 3 #define MAX_COLUMNS 2 I The array arrayIntValues is initialized by the following statement in your main(): int arrayIntValues [MAX_ROWS][ MAX_COLUMNS] = {{3,2), (4,5), (2, 2} }; Print out the array and the number of positive even numbers (label appropriately). User enters a new set of values into the array (must do it at least once) as many times as they wish and run how ManyEven against the new array values. Be sure to edit for input to be a positive integer. Then print new array values and number of positive integer numbers. Be sure to check for valid input ("Y" or "n") when asking if the user wants to enter a new set of values
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
