Program2 Multiplying Two Matrices
Program2 Multiplying Two Matrices
Summary
1. Give a concept about functions with calling methods (describe in one page)
2. Give a concept of 2-dimensional array .
Read elements for 2-dimensional array matrices matrix1 and again for matrix2
multiply elements of 2-dimensional array matrices matrix1 and matrix2 and save into matrix3
main()
1. Define three 2-dimensional arrays representing matrices of same sizes named as matrix1,
matrix2, matrix3. (we have to calculate value as matricx3 = matrix1+ matrix2)
2. Take required number of rows and columns in matrices
3. Call a function to read values for matrix1 named as “read_matrix” pass the required
arguments.
4. Call a function to read values for matrix2 named as “read_matrix” pass the required
arguments.
5. Call a function to multiply matrix1 and matrix2 named as “multiply_matrix” pass the
required arguments.
6. Call a function to print contents of matrix1 named as “print_matrix pass the required
arguments.
7. Call a function to print contents of matrix2 named as “print_matrix pass the required
arguments.
8. Call a function to print contents of matrix3 named as “print_matrix pass the required
arguments.
…………………………………………………………………………………………………………………………………………………………….
-----------------------------------------------------------------------------------------------------------------------------------
Output