#include <iostream>
using namespace std;
int x[4][4],detA,detB,detC,detD,detM;
void main()
{
//input function for 4x4 matrix
for ( int i =0; i < 4 ; i++)
for ( int j =0; j < 4 ; j++)
{
cout << " input x[" << i <<"]["<<j<<"]";
cin >> x[i][j];
}
//output function for 4x4 matrix
{
for( i =0; i < 4 ; i++)
{
cout <<"\n";
}
for( int j =0; j < 4 ; j++)
{
cout<< x[i][j];
cout<<"\t";
}
}
//determinant of 4x4 matrix
void det ()
{
detA = (x[1][1])( -1^2)((x[2][2])(x[3][3])(x[4][4]) + (x[2][3])(x[3][4])(x[4][2])+(x[2][4])(x[3][2])(x[4][3])-
(x[4][2])(x[3][3])(x[2][4])-(x[4][3])(x[3][4])(x[2][2])-(x[4][4])(x[3][2])(x[2][3]));
detB = (x[2][1])(-1^3) ((x[1][2])(x[3][3])(x[4][4])+ (x[1][3])(x[3][4])(x[4][2])+ (x[1][4])(x[3][2])(x[4][3])-
(x[4][2])(x[3][3])(x[1][4])-(x[4][3])(x[3][4])(x[1][2])-(x[4][4])(x[3][2])(x[1][3]));
detC = (x[3][1])(-1^4) ((x[1][2])(x[2][3])(x[4][4])+ (x[1][3])(x[2][4])(x[4][2])+ (x[1][4])(x[2][2])(x[4][3])-
(x[4][2])(x[2][3])(x[1][4])-(x[4][3])(x[2][4])(x[1][2])-(x[4][4])(x[2][2])(x[1][3]));
detD = (x[4][1])(-1^5) ((x[1][2])(x[2][3])(x[3][4])+ (x[1][3])(x[2][4])(x[3][2])+ (x[1][4])(x[2][2])(x[3][3])-
(x[3][2])(x[2][3])(x[1][4])-(x[3][3])(x[2][4])(x[1][2])-(x[3][4])(x[2][2])(x[1][3]));
detM = detA + detB + detC + detD;
}
}