Addition of two matrices, Arrays, C Language Assignment Help

Assignment Help: >> Memory map of the two dimensional Arrays >> Addition of two matrices, Arrays, C Language

Write a program to perform addition and subtraction of two matrices whose orders are up to 10x10.

#include< stdio.h>

main( )

{

 int i,j,r1,c1,a[10][10],b[10][10];

clrscr( );

printf("Enter Order of Matrix A & B up to 10X10:");

scanf("%d%d",&r1,&c1);

printf("Enter Elements of Matrix of A:\n");

for(i=0;i<r1;i++)

{

                                for(j=0;j<c1;j++)

                                scanf("%d",&a[i][j]);

}

printf("Enter Elements of Matrix of B:\n");

for(i=0;i<r1;i++)

{

                                for(j=0;j<c1;j++)

                                scanf("%d",&b[i][j]);

}

printf("\n Matrix Addition\n");

for(i=0;i<r1;i++)

{

                                for(j=0;j<c1;j++)

                                printf("%5d",a[i][j]+b[i][j]);

                                printf("\n");

}

getch();

}

 

 

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd