info@meritcampus.com    +91-85006-22255
...

Write a program to multiply the given matrices.

Input (Two Dimensional matrix) Output (Two Dimensional matrix)
`5   31   2and4   52   1` `11  1314  13`
`1   2   35   1   84   5   6and10   9   887   8   919   22   17` `82   85   235184   181   574286   277   913`
`-2   -4   36   7   8-1   2   2and1   2   35   4   34   5   6` `-4   -7   -104   7   1046   58   70`
`4   5   14   5   17   19   23and71923` `146146939`

``` class SimpleMatrixMultiplication {     public static void main(String s[])    {        int firstArray[][] = {{1, 2, 3, 4}, {9, 8, 7, -2}, {0, 5, -3, 7}};        int secondArray[][] = {{0, 2, 3, 1}, {8, 9, 11, -1}, {3, 2, 1, 7}, {-5, 2, 8, 1}};        System.out.println("Resultant matrix is :");        int multiplicationArray[][] = multiplyMatrices(firstArray, secondArray);        for (int[] array1d : multiplicationArray) {        for (int element : array1d) {        System.out.print(element + "   ");        }        System.out.println();        }    }     public static int[][] multiplyMatrices(int firstMatrix[][], int secondMatrix[][]) { ```
```     } } ```

Topic: Learn Arrays And Loops

0
Wrong
Score more than 2 points