#include <iostream.h>
#include <conio.h>
#include <iomanip.h>
int main ()
{
int x, y, a[3][3], b[3][3];
cout<<"PROGRAM PENJUMLAHAN MATIKS"<<endl;
cout<<"MATRIKS A"<<endl;
for(x=0;x<3;x++)
{
for(y=0;y<3;y++)
{
cout<<"Input Matrix Ke "<<x+1<<"."<<y+1<<" : "; cin>>a[x][y];
}
cout<<endl;
}
cout<<endl;
cout<<"MATRIKS B"<<endl;
for(x=0;x<3;x++)
{
for(y=0;y<3;y++)
{
cout<<"Input Matrix Ke "<<x+1<<"."<<y+1<<" : "; cin>>b[x][y];
}
cout<<endl;
}
cout<<endl;
cout<<"HASIL PENJUMLAHAN MATRIKS"<<endl;
for(x=0;x<3;x++)
{
for(y=0;y<3;y++)
{
cout<<setw(6)<<a[x][y]+b[x][y];
}
cout<<endl;
}
cout<<endl;
getch();
}