WAP in C to find determinant of matrix order 3x3
#include
void main()
{
int i, j,cal;
int det[3][3];
printf("\n Enter Elements of Matric 3x3\n");
for (i=0; i<3; i++)
for(j=0;j<3; j++)
scanf("%d",&det[i][j]);
}
printf("\n Enter matrix is:\n");
for (i=0;i<3;i++)
printf("%d\t",det[i][j]);
printf("\n");
// Determinants of the matrix
cal=(det[0][0])*(cal=(det[1][1]*det[2][2])-(det[2][1]*det[1][2]))-det[0][1]*((det[1][0]*det[2][2])-(det[2][0]*det[1][2]))+det[0][2]*((det[1][0]*det[2][1])-(det[2][0]*det[1][1]));
printf("\n the Determinant of the matrix=%d\n",cal);
OUTPUT