//SUM OF THE TWO MATRICES
#include<iostream.h>
#include<conio.h>
void main()
{
	int a[10][10],b[10][10],d[10][10];
	int m,n,u,c;
	clrscr();
	cout<<"Enter the no of rows of first or second matrix";
	cin>>m;
	cout<<"\nEnter the no of columns of first or second matrix";
	cin>>n;
	cout<<"Enter the first matrix";
	for(u=0;u<m;++u)
		for(c=0;c<n;++c)
			cin>>a[u][c];

	cout<<"Enter the second matrix";
	for(u=0;u<m;++u)
		for(c=0;c<n;++c)
			cin>>b[u][c];
	cout<<"\nThe first matrix is\n";
	for(u=0;u<m;++u)
	{
		for(c=0;c<n;++c)
			cout<<a[u][c]<<'\t';
		cout<<'\n';
	}

	cout<<"\nThe second matrix is\n";
	for(u=0;u<m;++u)
	{
		for(c=0;c<n;++c)
			cout<<b[u][c]<<'\t';
		cout<<'\n';
	}

	cout<<"\nThe Sum of two matrix is";
	for(u=0;u<m;++u)
	{
		for(c=0;c<n;++c)
		{
			d[u][c]=a[u][c]+b[u][c];
			cout<<d[u][c]<<'\t';
		}
		cout<<'\n';

	}
	getch();
}