Matrix Addition and Subtraction program in C language Today here you will be able to learn about multiple tasks in Matrix-like addition, subtraction, and multiplication. @#1.Matrix Addition Suppose that we have two matrices of 3X3 orders. This matrix A and B. In this program C is the addition of A & B; i and k are used for initialization. Matrix Addition Program #include"stdio.h" int main() { int A[10][10],B[10][10],C[10][10],i,k,row,col; printf("Enter The Matrix row & col = "); scanf("%d %d",&row,&col); printf("Enter the First matrix :\n"); for(i=0;i Output is: Enter The Matrix row & col = 2 3 Enter the First matrix : Enter matrix[0][0]=2 Enter matrix[0][1]=1 Enter matrix[0][2]=3 Enter matrix[1][0]=6 Enter matrix[1][1]=54 Enter matrix[1][2]=7 First matrix are: 2 1 3 6 54 7 Enter the Second matrix : Enter matrix[0][0]=8 Enter matrix[0][1...
Comments
Post a Comment