Mencari Matriks Simetri dengan c++

Code :

#include <iostream>
#include <conio.h>

using namespace std;

int main(){
    int baris, kolom, matriks[10][10];
    
    cout<<"MENCARI MATRIKS SIMETRI"<<endl;
    cout<<"--------------------------------"<<endl;
    cout<<"Masukkan jumlah baris : ";
    cin>>baris;
    
    cout<<"Masukkan jumlah kolom : ";
    cin>>kolom;
    cout<<endl;
    
    for(int i=0; i<baris; i++){
            for(int j=0; j<kolom; j++){
            cout<<"Masukkan baris "<<i+1<<" kolom "<<j+1<<" : ";
            cin>>matriks[i][j];
            }
    }
    cout<<endl;
    
    for(int i=0; i<baris; i++){
            for(int j=0; j<kolom; j++){
            cout<<matriks[i][j]<<" ";
            }
            cout<<endl;
    }
    cout<<endl;
    
    if(baris==kolom){
    cout<<"Matriks simetri";
    }else{
    cout<<"Bukan matriks simetri";
    }
    
    getch();
    return 0;   
}

Posted on Mei 15, 2011, in Algoritma & Pemrograman and tagged , , . Bookmark the permalink. 2 Komentar.

  1. makasih gan… dah tenang ane, dah dapet jawaban satu soal tentang matris simetri…

    jangan lupa mampir ke lapak ane gan…😀

  2. ok gan …
    langsung ke lokasi …

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: