public static void main(String[] args) {
int[][] array=new int[3][3];//生命数组
array[0][0]=5;
array[0][1]=7;
array[0][2]=6;
array[1][0]=4;
array[1][1]=11;
array[1][2]=12;
array[2][0]=8;
array[2][1]=10;
array[2][2]=3;
int[][] array1=new int[3][3];//生命数组
array1[0][0]=2;
array1[0][1]=5;
array1[0][2]=2;
array1[1][0]=3;
array1[1][1]=1;
array1[1][2]=3;
array1[2][0]=2;
array1[2][1]=2;
array1[2][2]=2;
int ii=0;
for (int i = 0; i < array.length; i++) {
if(ii==0){
System.out.println("┌ ┐ ┌ ┐ ┌ ┐");
}
System.out.print("│");
for (int j = 0; j < array.length; j++) {
System.out.print(array[i][j]+" ");
}
System.out.print("│");
if(i==1){
System.out.print(" ✖ ");
}else{
System.out.print(" ");
}
System.out.print("│");
for (int j = 0; j < array1.length; j++) {
System.out.print(array1[i][j]+" ");
}
System.out.print("│");
if(i==1){
System.out.print(" 〓 ");
}else{
System.out.print(" ");
}
System.out.print("│");
for (int j = 0; j < array1.length; j++) {
System.out.print(array[i][j]*array1[i][j]+" ");
}
System.out.print("│");
System.out.println();
ii++;
if(ii==3){
System.out.println("└ ┘ └ ┘ └ ┘");
}
}
}
运行结果如下