document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <iostream.h>
  2. #include <conio.h>
  3. #include <iomanip.h>
  4. int main ()
  5. {
  6. int x, y, a[3][3], b[3][3];
  7. cout<<"PROGRAM PENJUMLAHAN MATIKS"<<endl;
  8.  
  9. cout<<"MATRIKS A"<<endl;
  10.     for(x=0;x<3;x++)
  11.         {
  12.             for(y=0;y<3;y++)
  13.                 {
  14.                     cout<<"Input Matrix Ke "<<x+1<<"."<<y+1<<" : "; cin>>a[x][y];
  15.             }
  16.           cout<<endl;
  17.       }
  18.  
  19.     cout<<endl;
  20.     cout<<"MATRIKS B"<<endl;
  21.     for(x=0;x<3;x++)
  22.         {
  23.             for(y=0;y<3;y++)
  24.               {
  25.                     cout<<"Input Matrix Ke "<<x+1<<"."<<y+1<<" : "; cin>>b[x][y];
  26.            }
  27.          cout<<endl;
  28.       }
  29.  
  30.     cout<<endl;
  31.     cout<<"HASIL PENJUMLAHAN MATRIKS"<<endl;
  32.     for(x=0;x<3;x++)
  33.         {
  34.             for(y=0;y<3;y++)
  35.               {
  36.                     cout<<setw(6)<<a[x][y]+b[x][y];
  37.            }
  38.          cout<<endl;
  39.         }
  40.     cout<<endl;
  41. getch();
  42.  
  43.  
  44. }
');