A matrix is given in source data. You have to write user defined functions and create a
Question:
A matrix is given in source data. You have to write user defined functions and create a menu in C++ keeping in mind the following requirements:
1. Press 1 to display the matrix and its transpose.
(Hint: Transpose of a matrix can be achieved by changing its rows into columns or columns into rows.)
2. Press 2 to find adjoint and determinant of the matrix.
(Hint: To find adjoint of a matrix, we change the places of its diagonal elements and the signs of non-diagonal
elements; To find determinant of matrix, we subtract the product of non-diagonal elements from the product
of diagonal elements.)
3. Press any other key to exit.
Source data:
(Use two dimensional array to store following matrix)
Instructions to write C+program:
Write functions to display the matrix; find transpose, adjoint and determinant of the matrix. Following function names should be used for consistency
Sample Output
1) When 1 is pressed
2) When 2 is pressed
3) When any other key is pressed
Mathematical Applications for the Management Life and Social Sciences
ISBN: 978-1305108042
11th edition
Authors: Ronald J. Harshbarger, James J. Reynolds