#include <iostream.h>
#include <conio.h>
const int n=2, m=3;
void main( )
{
float a[n][m];
float b[m][n];
float c[n][n];
int i,j,k;
clrscr();
cout<<"Input the Elements of Matrix a ";
for(i=0;i<n;i++)
{
for(k=0;k<m;k++)
cin>>a[i][k];
cout<<endl;
}
cout<<"Input the Elements of Matrix b ";
for(k=0;k<m;k++)
{
for(j=0;j<n;j++ )
cin>>b[k][j];
cout<<endl;
}
cout<<endl;
cout<<"Product of the Matrices"<<endl;
for(i=0;i<n;i++)
{
for(j=0;j<n;j++ )
{
c[i][j]=0;
for(k=0;k<m;k++ )
c[i][j]=c[i][j]+a[i][k]*b[k] [j];
cout<<c[i] [j]<<" ";
}
cout<<endl;
}
getch();
}