Output1:
Enter matrix order:3
1. Take User input
2. Take File input
>>>1
Enter a[0][0]:4
Enter a[0][1]:5
Enter a[0][2]:6
Enter a[1][0]:8
Enter a[1][1]:9
Enter a[1][2]:2
Enter a[2][0]:6
Enter a[2][1]:4
Enter a[2][2]:7
A[3][3]:
4.000000 5.000000 6.000000
8.000000 9.000000 2.000000
6.000000 4.000000 7.000000
NonSingular Matrix
=============================================================================================
INV-A[3][3]:
-0.416667 0.083333 0.333333
0.333333 0.060606 -0.303030
0.166667 -0.106061 0.030303
=============================================================================================
1.000000 -0.000000 0.000000
-0.000000 1.000000 0.000000
0.000000 -0.000000 1.000000
Output2:
Enter matrix order:5
1. Take User input
2. Take File input
>>>2
Enter file name>>> matrix.txt
A[5][5]:
2.000000 15.000000 13.000000 13.000000 8.000000
6.000000 0.000000 4.000000 5.000000 19.000000
9.000000 3.000000 4.000000 0.000000 8.000000
1.000000 11.000000 3.000000 16.000000 8.000000
10.000000 19.000000 5.000000 9.000000 20.000000
NonSingular Matrix
=============================================================================================
INV-A[5][5]:
-0.044762 -0.052732 0.189492 0.073850 -0.037336
0.008855 -0.045723 -0.048856 -0.033986 0.073031
0.094667 0.022941 0.017931 -0.059990 -0.042837
-0.020892 -0.002071 0.057795 0.112669 -0.057861
-0.000297 0.064999 -0.078824 -0.040341 0.036035
=============================================================================================
1.000000 -0.000000 -0.000000 0.000000 -0.000000
-0.000000 1.000000 0.000000 0.000000 -0.000000
-0.000000 -0.000000 1.000000 0.000000 0.000000
0.000000 -0.000000 -0.000000 1.000000 -0.000000
-0.000000 -0.000001 0.000000 0.000001 1.000000