#include
#include
void main () {
typedef int matrik22[100][100];
matrik22 A,B,C ;
int nb1,nk1b2 , nk2 ,k,j,i;
cout<<"BERAPA BARIS ARRAY A =";cin>>nb1;
cout<<"BERAPA KOLOM ARRAY A DAN BARIS ARRAY B =";cin>>nk1b2;
cout<<"BERAPA KOLOM ARRAY B =";cin>>nk2;
//A
for(i=0;i
cout<<"Matrik A["< cin>>A[i][j];
}
}
cout<
//B
for(i=0;i
cout<<"Matrik B["< cin>>B[i][j];
}
}
//perkalian array A dan B
for(i=0;i
{
C[i][j]=0;
for ( k=0;k
C[i][j]+=A[i][k]*B[k][j];
}
}
}
//menampilkan hasil pengalian matrik A dan B
cout<<"\nHasil Perkalian Matrik A dan B \n";
for (j=0;j
cout<<"["<
}
getch ();
}
No comments:
Post a Comment