This is a homework assaignment chapter 7 problem 18 Write a program that creates
ID: 3617045 • Letter: T
Question
This is a homework assaignment chapter 7 problem 18 Write a program that creates a 2D array with initialized testdata. Use any data type you wish. The program shouldhave the following functions: getTotal - this function should accepty a 2Darray as its arguement and return the total of all the values ofthe array getAverage - same as getTotal but return theaverage of all the values in the array getRowTotal - this function should accept a 2Darray as its first arguement and an integer as its secondargument. The second argument should be the subscript of arow in the array. The function should return the total of thevalues in the specified row. getColumnTotal - This function should accept 2Darray as its first argument and an integer as its secondargument. The second argument should be the subscript of acolumn in the array. The function should return the total ofthe values in the specified column. getHighestInRow - This function should accept a2D array as its first argument and in integer as its secondargument. The second argument should be the subscript of arow in the array. The function should return the highestvalue in the specified row of the array. getLowestInRow - same as get highest in row butreturn lowest value in the specified row of the array. This is a homework assaignment chapter 7 problem 18 Write a program that creates a 2D array with initialized testdata. Use any data type you wish. The program shouldhave the following functions: getTotal - this function should accepty a 2Darray as its arguement and return the total of all the values ofthe array getAverage - same as getTotal but return theaverage of all the values in the array getRowTotal - this function should accept a 2Darray as its first arguement and an integer as its secondargument. The second argument should be the subscript of arow in the array. The function should return the total of thevalues in the specified row. getColumnTotal - This function should accept 2Darray as its first argument and an integer as its secondargument. The second argument should be the subscript of acolumn in the array. The function should return the total ofthe values in the specified column. getHighestInRow - This function should accept a2D array as its first argument and in integer as its secondargument. The second argument should be the subscript of arow in the array. The function should return the highestvalue in the specified row of the array. getLowestInRow - same as get highest in row butreturn lowest value in the specified row of the array.Explanation / Answer
please rate - thanks #include using namespace std; #define row 4 #define col 5 int getTotal(int[][col]); double getAverage(int[][col]); int getRowTotal(int[][col],int); int getColumnTotal(int[][col],int); int getHighestRow(int[][col],int); int getLowestRow(int[][col],int); int main() {int i,j,n; int mat[row][col]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.