Contoh Program Array 2 (dua) dimensi

    1. Contoh Program Array berdimensi 2 :

      #include <iostream.h>
      #include <conio.h>
      #include <iomanip.h>
      void main()
      {

          cout<<" ******** Program Menghitung Operasi Matrik ********* \n";
          cout<<" ------------------  MAKUL ALPRO  ------------------- \n";
          cout<<" ---------------------------------------------------- \n";
      int matrik[3][3];
      for(int i=0; i<3; i++)
      {
          for(int j=0; j<3; j++)
          {
              cout<<" Elemen ke "<<(i+1)<<","<<(j+1)<<" : ";
              cin>>matrik[i][j];
          }
      }
      cout<<endl<<" Matrik Hasil : "<<endl;
      for(int a=0; a<3; a++)
      {
          for(int j=0; j<3; j++)
          {
      cout<<setw(4)<<matrik[a][j]<<" ";
          }
          cout<<endl;
      }
      cout<<" ----------------------------------------------------"<<endl;
      cout<<" -------------TEKNIK INFORMATIKA---------------------"<<endl;
      cout<<" ----------------------------------------------------"<<endl;
      getch();
      }

      Hasil Listing :

      program download di sini

0 komentar:

Daftar Blog

a

Ads 468x60px

Featured Posts

welcome

selamat datang di blog saya

blog ini berisi tutorial belajar C++ dan bahasa pemrograman laennya
semoga Bermanfaat

salam kenal
from hapish

About Me

Label

Popular Posts

fan page

Blogger templates