#include<iostream>
usingnamespace std;
class matrix
{
int rows_1;
int rows_2;
int colums_1;
int colums_2;
public:
matrix(): rows_1(0),rows_2(0),colums_1(0),colums_2(0)
{
}
void set()
{int i,j;
cout<<"Enter the rows of first matrix\n";
cin>>rows_1;
cout<<"Enter the rows of second matrix\n";
cin>>rows_2;
cout<<"Enter the columns of first matrix\n";
cin>>colums_1;
cout<<"Enter the columns of second matrix\n";
cin>>colums_1;
cout<<"Enter the elements of first matrix\n";
for(i=0;i<rows_1;i++)
{
for(j=0;j<colums_1;j++)
{
cin>>a[i][j];
}
}
cout<<"Enter the elements of second matrix";
for(i=0;i<rows_2;i++)
{
for(j=0;j<colums_2;j++)
{
cin>>a[i][j];
}
}
}
int a[rows_1][colums_1];
int b[rows_2][colums_2];
};
int main()
{
matrix mult;
mult.set();
mult.mult();
}