1 回答
已采納

慕粉15160033427
TA貢獻(xiàn)2條經(jīng)驗(yàn) 獲得超1個(gè)贊
package answear;
public class Inter {
?
?public static void main(String[] args) {
??int[][] a = {{2,3,4},{4,6,8}};
??int[][] b = {{1,5,2,8},{5,9,10,-3},{2,7,-5,-18}};
??int[][] c = new int[2][4];
?System.out.println("生成的新數(shù)組c是:");
??for(int i=0; i<2; i++){
???for(int j=0; j<4; j++){
????int temp = 0;
????for(int k=0; k<3; k++){
?????temp += a[i][k]*b[k][j];
????}
????c[i][j] = temp;
????System.out.print(c[i][j]+" ");
???}
???System.out.println();
??}
?}
}
添加回答
舉報(bào)
0/150
提交
取消