#include <stdio.h>
int main()
{
int a[2][2] = {{5, -2}, {0, 3}};
int i, j;
int det;
// for (i = 0; i < 3; i++)
// {
// for (j = 0; j < 3; j++)
// {
// printf("Enter a[%d][%d]: ", i, j);
// scanf("%d", &a[i][j]);
// }
// }
printf("\nMatrix is:\n");
for (i = 0; i < 2; i++)
{
for (j = 0; j < 2; j++)
{
printf("%d ", a[i][j]);
}
printf("\n");
}
// TO find the determinant of the matrix
det = a[0][0] * a[1][1] - a[0][1] * a[1][0];
printf("Determinant of the matrix is: %d\n", det);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: