Write a program to input any two matrices and print product of matrices.
Answers
Answer:
hey..... mate ur ans.... is here
Input: row1 = 2, col1 = 2,
mat1[][] = {{1, 2},
{3, 4}},
row2 = 2, col2 = 2,
mat2[][] = {{1, 1},
{1, 1}}
Output: {{3, 3},
{7, 7}}
Input: row1 = 2, col1 = 2,
mat1[][] = {{2, 4},
{3, 4}}
row1 = 2, col1 = 2,
mat2[][] = {{1, 2},
{1, 3}}
Output: {{6, 16},
{7, 18}}
hope it use full
plzz mark as brainlist
Question:
Write a program to input any two matrices and print product of matrices.
Answer:
import java.util.*;
public class Product
{
public static void main(String args[])
{
Scanner in =new Scanner(System.in);
int M,X,N;
System.out.println("Enter the matrices ");
M= in.nextInt();
X=in.nextInt();
N=M*X;
System.out.println("The product is="+N);
}
}
For more java programmings follow the given links as I have solved earlier:
brainly.in/question/14335606
brainly.in/question/14323927
brainly.in/question/14370842
brainly.in/question/14395545
brainly.in/question/14809512
brainly.in/question/14809885
brainly.in/question/14840551
brainly.in/question/15125968
brainly.in/question/15584326
brainly.in/question/15947017
https://brainly.in/question/16062696
https://brainly.in/question/16091640