Question: (Matrix Addition and Multiplication) Write a program that allows the user to enter two matrices and perform their addition and multiplication. You can only add
(Matrix Addition and Multiplication) Write a program that allows the user to enter two matrices and perform their addition and multiplication. You can only add or multiply two matrices if their dimensions are compatible. For matrix multiplication, it means the number of columns in the first matrix is the same as the number of rows in the second matrix. The program execution looks like:

please use C.
1 CATEMP\MatrixAddMultiply.exe Enter the number of rows and columns of the 1st matrix: 33 Enter the 9 elements of the 1st matrix: 120011201 Enter the number of rows and columns of the 2nd matrix: 33 Enter the 9 elements of the 2nd matrix: 112 2111 2 The 1st matrix is: i 2 0 0 1 1 2 0 1 The 2nd matrix is: 1 1 2 2 1 1 1 2 1 The addition of the two entered matrices is: 2 3 2 2 2 2 The multiplication of the two entered matrices is: 3 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
