Multiply 2 matrices
Submissions: 2081   Accuracy:

37.77%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

For 2 given matrix of size 3*3 multiply them and print the matrix.

Input:
The first line contains an integer 'T' denoting the total number of test cases.
In each test cases, it consists of six lines and each line has three integers. First three line denoted the first matrix and then next three line denotes the second matrix.

 
Output:
Print three lines and in each line three integers which is resultant matrix after multiplication of 2 matrices.


Constraints:
1<=T<=30
1<=Number<=100


Example:
Input:
1
1 1 1 
1 1 1 
1 1 1 
1 1 1 
1 1 1 
1 1 1 

Output:
3 3 3
3 3 3
3 3 3

** For More Input/Output Examples Use 'Expected Output' option **

Author: abhiraj26


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.