/*nama kelompok: apip(12150005)
hadiansyah ade gunawan(12150617)
miftakhul anam(12155442)
afip fatkhurochim(12156207)
aditya sanjaya:agung sugiarto(12150269)*/
#include <iostream>
using namespace std;
int main()
{
int i, j;
typedef int MATRIX32[3][2];
MATRIX32 A, B, C;
cout<<"MATRIK A"<<endl;
for (i=0; i<3; i++)
{
for (j=0; j<2; j++)
{
cout<<"A["<<i<<"]["<<j<<"] : "; cin>>A[i][j];
}
}
cout<<endl;
cout<<"MATRIK B"<<endl;
for (i=0; i<3; i++)
{
for (j=0; j<2; j++)
{
cout<<"B["<<i<<"]["<<j<<"] : "; cin>>B[i][j];
}
}
cout<<endl;
for (i=0; i<3; i++)
{
for (j=0; j<2; j++)
{
C[i][j] = A[i][j] + B[i][j];
}
}
cout<<"MATRIK C = A+B"<<endl;
for (i=0; i<3; i++)
{
for (j=0; j<2; j++)
{
cout<<"C["<<i<<"]["<<j<<"] : "<<C[i][j]<<endl;
}
}
return 0;
}
tugas sudah saya koreksi. sudah cukup baik
BalasHapus