Multiply Matrices
School Accuracy: 48.41% Submissions: 14180 Points: 0

Given two square Matrices A[][] and B[][]. Your task is to complete the function multiply which stores the multiplied matrices in a new matrix C[][].
 

Example 1:

Input: 
N = 2
A[][] = {{7, 8}, {2 , 9}}
B[][] = {{14, 5}, {5, 18}}

Output: 
C[][] = {{188, 359}, {73, 172}}

 

Example 2:

Input: 
N = 2
A[][] = {{17, 4}, {17 , 16}}
B[][] = {{9, 2}, {7, 1}}

Output: 
C[][] = {{181, 38}, {265, 50}}

Constraints:
1 <=T<= 100
1 <= N <= 20

We are replacing the old Disqus forum with the new Discussions section given below.
Click here to view old Disqus comments.


to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

Multiply Matrices

Output Window