Question: Implement a C++ class to model the mathematical operations of a matrix. Your class should include the following functions. add() which adds two matrices: power()
Implement a C++ class to model the mathematical operations of a matrix. Your class should include the following functions. add() which adds two matrices: power() which raises the first matrix to power n: "" which returns true if both matrices are equal. You need to overload the C++ equality operator. A sample run follows. Enter the number of rows: 2 Enter the number of columns: 3 Enter the elements of matrix 1 row by row: 1 5 0 1 3 2 Enter the elements of matrix 2 row by row: 1 1 1 0 2 4 matrix 1 == matrix 2? No matrix 1 + matrix 2: 2 6 1 1 5 6 matrix 1power n. Enter n: 2 1 25 0 1 9 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
