این هم سورس ضرب 2 ماتریس در یکدیگر امیدوارم به کارتون بیاد
# include <iostream.h>
# include <conio.h>
int main ()
{
int mat1[2][3],mat2[3][4],mat3[2][4]={0};
int i,j,k;
cout<<"lotfan araiehaie mat1 ra vared konid"<<endl;
for (i=0;i<2;i++)
for(j=0;j<3;j++)
cin>>mat1[i][j];
//_________________________paiane gereftane matrix 1__________________________
cout<<"lotfan araiehaie mat2 ra vared konid"<<endl;
for (i=0;i<3;i++)
for(j=0;j<4;j++)
cin>>mat2[i][j];
//_________________________paiane gereftane matrix 2__________________________
cout<<"hasele zarbe 2 matris barabar ast ba "<<endl;
for (i=0;i<2;i++)
for(j=0;j<4;j++)
{
mat3[i][j]=0;
for(k=0;k<3;k++)
mat3[i][j]=mat3[i][j]+mat1[i][k]*mat2[k][j];
}//end of for j
for (i=0;i<2;i++)
{
for (j=0;j<4;j++)
cout<<" "<<mat3[i][j];
cout<<endl;
}// end of for i
cout<<endl;
cout<<"paiane barnameie zarbe matrisi"<<endl;
cout<<endl;
cout<<"Rasekhoon.net"<<endl;
cout<<"barname Nevis : Seyyed Reza Hashemian"<<endl;
cout<<"good bye";
//____________________paiane amaliate zarbe beine 2 matris_____________________
getch();
return 0;
}