C PRACTICAL / SUMMATION OF TWO 3x3 MATRIX

hello friends....

TAKE THE FIRST STEP TO KNOWLEDGE FRIENDS BECAUSE KNOWLEDGE IS FREE. 

>> /* WRITE A C PROGRAM TO MAKE SUMMATION OF TWO 3x3 MATRIX. */

#include<stdio.h>
#include<conio.h>
void main()
{
   int A[3][3],B[3][3],C[3][3],i,j;
   clrscr();

   printf("enter matrix A value:\n");
   for(i=0; i<=2; i++){
     for(j=0; j<=2; j++){
scanf("%d",&A[i][j]);
     }
   }
   printf("enter matrix B value:\n");
   for(i=0; i<=2; i++){
     for(j=0; j<=2; j++){
scanf("%d",&B[i][j]);
     }
   }
   printf("sum of two matrix A & B\n");
   for(i=0; i<=2; i++){
     for(j=0; j<=2; j++){
C[i][j] = A[i][j] + B[i][j];
printf("%d\t",C[i][j]);
     }
     printf("\n");
   }
   //printf("\n");
   getch();
}

    /* OUTPUT  */
=======================

enter matrix A value:
1
2
3
4
1
2
3
4
1
enter matrix B value:
4
3
2
1
4
3
2
1
4
sum of two matrix A & B:
5 5 5
5 5 5
5 5 5

* * * * * * * * * * * * * *
http://www.dnpdeveloper.com

if you have like this blog so share and subscribe, comment for this blog.
if your any question, so comment pleass.
MY INSTAGRAM ID : dnp176

Comments