int main(void)
{
int a, b, c, element; //A, B, C = value of each element in the matrix
int i, j, k;
int array1[5][3], array2[3][5], array3[5][5];
cout<<"This program will the Matrix multiplication for 5x3 matrix and 3x5 matrix.\n"
<<endl;
cout<<"Please enter the value of a = ";
cin>>a;
cout<<"Please enter the value of b = ";
cin>>b;
cout<<"Please enter the value of c = ";
cin>>c;
for (i = 0; i<5; i++)
{
for (j = 0; j<5; j++)
{
for (k = 0; k<3; k++)
{
array2[i][k] = b*((i+1)*10 + k +1);
array1[k][j] = a*((k+1)*10 + (j+1));
element= (array2[i][j]*array1[k][j]);
array3[i][j]= element;
}
cout<<array3[i][j]
<<setw(10);
if(j == 4)
cout<<endl;
}
}
system("pause");
return 0;
}