Question: share code screen shot thanks QUESTION 2 (MATRIX MANIPULATION) A matrix is an array of numbers of size m by n (ie, mxn). When we

QUESTION 2 (MATRIX MANIPULATION) A matrix is an array of numbers of size m by n (ie, mxn). When we multiply 2 matrices, we multiply the matching numbers, then sum them up. Multiplying a matrix of size mxn with another matrix of size nxq will result in a matrix of size m xq. An example is shown in Figure 1: (3-60-6 pa +40 pb + ad ra + serb + sd ta + utbud Matrix 3 x 2 Matrix 2 x 2 Matrix 3 x 2 Figure 1: Multiplication of Matrix 3 x 2 and 2 x 2 Write a C++ program that multiplies 2 matrices and return the sum of the transposed matrix. Your program shall include the following: a) Define two 2 dimensional arrays, M and that each represents a matrix of size 3 x 2 and a matrix of size 2 x 2. Request the user to enter the values for the 2 arrays using advanced pointer notations (refer to your slides for the list of array pointer notations). b) Create a function named multMatrix( that passes as arguments, the values of array M and N. multiplies them and store the results in a new matrix MN. Use pointer notations to multiply your arrays. Display your multiplied arrays. c) Create a function named calcTotal that passes as argument, the values of array MN, sum up all its elements and return the total value from the function. Use advanced pointer notations to perform your summation. Display your result in main(). The basic program and function stubs are given below as a guideline. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
