CA#include"iostream.h"
void main(){
{
int B[3][2],C[3][2],A[3][2];
int i,j;
cout<<"Input Matrik A\n";
for(i=0;i<3;i++)
for(j=0;j<2;j++){
cout<<"Matrik A["<<i<<","<<j<<"]:";
cin>>A[i][j];
}
cout<<"Input Matrik B\n";
for(i=0;i<3;i++)
for(j=0;j<2;j++){
cout<<"Matrik B["<<i<<","<<j<<"]:";
cin>>B[i][j];
}
for(i=0;i<3;i++)
for(j=0;j<2;j++)
C[i][j]=A[i][j]+A[i][j];
cout<<"Matrik C\n";
for(i=0;i<3;i++)
for(j=0;j<2;j++){
cout<<C[i][j]<<" ";
}
cout<<"\n";
}
}
Tidak ada komentar:
Posting Komentar