C program for matrix addition

matrix program in c

C program for matrix addition #include <stdio.h> int main() { int a, b, c, d; int m1[10][10], m2[10][10], sum[10][10]; printf(“Please enter the number of rows of matrix\n”); scanf(“%d”, &a); printf(“Please enter number of columns of matrix\n”); scanf(“%d”, &b); printf(“Please enter the elements of first matrix one by one\n”); for ( c = 0 ; c … Read more

C Program to find Deteminant of 2×2 Matrix

matrix program in c

C Program to find Deteminant of 2×2 Matrix #include<stdio.h> int main() { printf(“\n\n\t\tEduguru – C Program example\n\n\n”); int a[2][2], i, j; long determinant; printf(“\n\nEnter the 4 elements of the array\n”); for(i = 0; i < 2; i++) for(j = 0; j < 2; j++) scanf(“%d”, &a[i][j]); printf(“\n\nThe entered matrix is: \n\n”); for(i = 0; i … Read more