Menu
Question Index
...

Write a program to get the inverse of 2 x 2 matrix.

Input (Two Dimensional matrix) Output (Two Dimensional matrix)
5  8
2   4
1.0  -2.0
-0.5  1.25
20  45
2  5
0.5  -4.5
-0.2  2.0
-1  2
3  -7
-7.0  -2.0
-3.0  -1.0
1  2
2  3
-3.0  2.0
2.0  -1.0



class FindTheInverseOf2X2Matrix
{
    public static void main(String s[])
    {
        int input[][] = {{20, 45}, {2, 5}};
        double output[][] = getInverse(input);
        for (double[] array1d : output) {
        for (double element : array1d) {
        System.out.print(element + "   ");
        }
        System.out.println();
        }

    }


    public static double[][] getInverse(int matrix[][]) {
    }
    
    public static int getDeterminant(int matrix[][]) {
    int result = 0;
    return result;
    }

}

Doubts

Problems

Topic: Learn Arrays And Loops

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App