The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 4 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
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.
should be in three files mat.cpp testmat.cpp & mat.h
out put run follows.
Enter the number of rows: 2
Enter the number of columns: 3
Enter the elements of matrix 1 row by row:
1 0 3
5 1 2
Enter the elements of matrix 2 row by row:
1 1 2
1 0 4
matrix 1 == matrix 2?
No
matrix 1 + matrix 2:
2 1 5
6 1 6
matrix 1 power n. Enter n: 2
1 0 9
25 1 4
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------sol-----------uti-----------on.-----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- ca-----------tch-----------