// Q.16 WAP for MAtrix Manipulations (Addition)
#include
#include
int main()
{
int a[3][3];
int b[3][3];
int c[3][3];
x:
clrscr();
cout <<"\nEnter the element's of the first (3x3)Matrix " ;
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
cout << "\n";
cout << "Enter a number : ";
cin >> a[i][j];
}
}
cout << "\nEnter the element's of the second (3x3)Matrix " ;
cout << "\n";
for(int k=0;k<3;k++)
{
for(int l=0;l<3;l++)
{
cout << "\n";
cout << "Enter a number : ";
cin >> b[k][l];
}
}
cout << "\n\n";
for(int m=0;m<3;m++)
{
cout << "\n";
for(int n=0;n<3;n++)
{
c[m][n]=a[m][n]+b[m][n];
cout <<" "<> ch;
if(ch=='y' || ch=='Y')
goto x;
else
if(ch=='n' || ch=='N')
return 0;
getch();
return 0;
}