Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i,j;
- int A[3][3] = {3,11,9,4,2,5,7,0,1};
- int B[3][3] = {1,9,3,5,6,2,15,10,5};
- int Sum[3][3];
- for(i=0;i<3;i++)
- {
- for(j=0;j<3;j++)
- {
- Sum[i][j] = A[i][j] + B[i][j];
- }
- }
- printf("The Addition of two Matrix is:\n");
- for(i=0;i<3;i++)
- {
- for(j=0;j<3;j++)
- {
- printf("%d\t",Sum[i][j]);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment