C++ program to print the given matrix
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out Enter the number of row(s) -5 Enter the number of column(s) 2 ------------------------------------------- Enter the valid number of rows and columns ------------------------------------------- kodingwindow@kw:~$ ./a.out Enter the number of row(s) 2 Enter the number of column(s) 3 Enter elements for matrix A [1][1]=1 [1][2]=5 [1][3]=9 [2][1]=7 [2][2]=5 [2][3]=3 Matrix A is 1 5 9 7 5 3 kodingwindow@kw:~$
What Next?
C++ program to print the transpose of a given matrix
C++ program for addition of two matrices
C++ program for addition and subtraction of two matrices
Advertisement