#include
#include
#include
class matriks{
friend istream& operator>>(istream&, matriks&);
friend ostream& operator<<(ostream&, matriks&);
public:
void baca_matriks();
matriks& transpose(const matriks&);
private:
int baris, kolom;
int A[10][10];
};
void matriks::baca_matriks(){
int i,j;
for(i=0; i
}
}
matriks& matriks::transpose(const matriks& matrik){
int i,j;
baris=matrik.kolom;
kolom=matrik.baris;
for(i=0;i
cout<>A.baris;
cout<>A.kolom;
cout<<"Masukkan data matriks\n";
A.baca_matriks();
return in;
}
ostream& operator<<(ostream& out, matriks& A){
int i,j;
for(i=0;i
cout <
cout<<"Data Matrik :\n"; cout <
T.transpose(matrik);
cout << T;
getch();
return 0;
}
Tidak ada komentar:
Posting Komentar