/* Program to calculate determinant of a 2X2 matrix */ #include #include int main() { printf("Enter the matrix: "); int i, mat[2][2],j; for(i=0;i<2;i++) for(j=0;j<2;j++) scanf("%d",&mat[i][j]); int det; det=mat[0][0]*mat[1][1]-(mat[0][1]*mat[1][0]); printf("Det = %d", det); system("PAUSE"); }