//File ID:Shaimaa Falah
//Title: This Program for Calculate Two Matrix Multiplication By Standard Method
#include <iostream.h>
void main()
{
int M1[10][10], M2[10][10], M3[10][10];
int x1, x2, y1, y2,i,j,k;
cout << endl;
cout<<"*************************************************************************"" " ;
cout<<"\n This is program to calculate the multiplication product of two matrixes \n";
cout<<"*************************************************************************"" " ;
cout << endl;
cout << endl;
cout<<"\\\\\\\\\\\\\\ ** Information of First Array (A) ** \\\\\\\\\\\\\\\n";
cout<<"\n\n Enter the number of Rows in Array (A) : ";
cin>>x1;
cout<<"\n\n Enter the number of columns in Array (A) : ";
cin>>y1;
cout<<"\n\nEnter the values of First Array (A) : ";
for( i=0; i < x1; i++)
for ( j=0; j < y1; j++)
cin >> M1[i][j];
cout << endl;
cout << endl;
cout<<"\\\\\\\\\\\\\\ ** Information of Second Array (B) ** \\\\\\\\\\\\\\\n";
cout<<"\n\n Enter the number of Rows in Array (B) : ";
cin>>x2;
cout<<"\n\n Enter the number of columns in Array (B) : ";
cin>>y2;
cout<<"\n\nEnter the values of Second Array (B) : ";
for (i =0 ; i < x2; i++)
for ( j=0; j < y2; j++)
cin >> M2[i][j];
cout << endl;
cout << endl;
for (i = 0 ; i < x1; i++)
for ( k=0; k < y2; k++)
for ( j=0; j < y1; j++)
M3[i][k] += M1[i][j] * M2[j][k];
cout << endl;
cout<<"\n *********************** \n " ;
cout<<" \\ *********** The Product Array (C) *********** \\ " ;
cout<<"\n *********************** " ;
cout << endl;
cout << endl;
for (i = 0; i < x1; i++)
{
for ( j = 0; j < y2; j++)
cout << "\t" << M3[i][j] << "\t";
cout << endl;
} ;
}