This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
1. #include #include #include using namespace std; class macierz {private: int w; int k; float**t; public: macierz(int w1, int k1) {w=w1; k=k1; t=new float*[w]; for (int i=0;i<w;++i) t[i]=new float[k]; for (int i=0;i<w;++i) for (int j=0;j
} ostream & operator<<(ostream &w, macierz m) { for (int i=0; i<m.W();++i) { for (int j=0; j<m.K();++j) w<<m.m(i,j)<<"|"; w<<endl; } return w; } int main(int argc, char *argv[]) { srand(time(NULL)); macierz x(2,2); macierz y(2,2); macierz z (2,2); z=il(x,y); print (x); cout<<endl; print (y); cout<<endl; print (z); cout<<endl; system("PAUSE"); return EXIT_SUCCESS; }
2. 2. #include #include #include using namespace std; class macierz {private: int w; int k; float**t; public: macierz(int w1, int k1) {w=w1; k=k1; t=new float*[w];
for (int i=0;i<w;++i) t[i]=new float[k]; for (int i=0;i<w;++i) for (int j=0;j
int main(int argc, char *argv[]) { srand(time(NULL)); macierz x(2,2); macierz y(2,2); macierz z (2,2); macierz m (2,2); macierz w (2,2); z=il(x,y); print (x); cout<<endl; print (y); cout<<endl; print (z); cout<<endl; print (w); cout<<endl; print (m); system("PAUSE"); return EXIT_SUCCESS; }