Given two matrices, we have to multiply them.
Note: For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the second matrix.
Example:
Input:
matrix 1:
[3, 4, 5, 6]
[7, 8, 9, 8]
[3, 2, 1, 2]
matrix 2:
[3, 4]
[2, 3]
[4, 5]
[6, 7]
Output:
[73, 91]
[121, 153]
[29, 37]
Program to multiply two matrices in Kotlin
Output
need an explanation for this answer? contact us directly to get an explanation for this answer