Hello there,,
i wrote this programe to Add two Matrix but i didn't know how can i maltiply it pleace help me...
//This program to add two dimention
import java.util.*;
public class AddMatrex{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int[][]x=new int[2][3];
int[][]y=new int[2][3];
int [][]z=new int [2][3];
for(int i=0; i<2; i++){
for(int j=0; j<3; j++){
System.out.println("For the First Matrex row" +i+ "column" +j);
x[i][j]=scan.nextInt();
System.out.println("For the scond Matrx row" +i+ "column" +j);
y[i][j]=scan.nextInt();
z[i][j]=0;
z[i][j]= x[i][j] + y[i][j];
}
}
System.out.println("The 1st matrix");
for(int i=0; i<2; i++){
for(int j=0; j<3; j++){
System.out.print(x[i][j]+"\t");
}
System.out.println();
}
System.out.println("***************************");
System.out.println("The 2nd Matrix");
for(int i=0; i<2; i++){
for(int j=0; j<3; j++){
System.out.print(y[i][j]+"\t");
}
System.out.println();
}
System.out.println("***************************");
System.out.println("The Agging Matrix");
for(int i=0; i<2; i++){
for(int j=0; j<3; j++){
System.out.print(z[i][j]+"\t");
}
System.out.println();
}
}
}

