Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <utility>
- #include "Macierz.h"
- #include <conio.h>
- using namespace std;
- int main(int argc, char** argv) {
- Macierz A = Macierz(2,2);
- Macierz C = Macierz(4,2);
- Macierz K = A;
- cout<<"\nAdres A macierzy przed przenoszeniem: "<<A.daj_adres_komorki();
- Macierz P(move(A));
- cout<<"\nAdres A macierzy po przenoszeniu: "<<A.daj_adres_komorki();
- cout<<"\nAdres macierzy P: "<<P.daj_adres_komorki();
- cout<<"\nWypelnianie macierzy P:\n";
- P.wypelnijMacierz();
- cout<<"\nWypelnianie macierzy C:\n";
- C.wypelnijMacierz();
- cout<<"\nMacierz P";
- P.wyswietlMacierz();
- cout<<"\nMacierz C";
- C.wyswietlMacierz();
- cout<<"\nDodawanie macierzy C do macierzy C";
- C.dodajMacierz(C);
- cout<<"\nMacierz C";
- C.wyswietlMacierz();
- cout<<"\nMnozenie macierzy P przez skalar";
- int skalar;
- cout<<"\nPodaj liczbe: ";
- cin>>skalar;
- P.pomnozPrzezSkalar(skalar);
- cout<<"\nMacierz P";
- P.wyswietlMacierz();
- cout<<"\nMnozenie macierzy P przez C";
- Macierz wynik=P.pomnozPrzezMacierz(C);
- cout<<"\nMacierz wynik:";
- wynik.wyswietlMacierz();
- cout<<"\nKoniec programu";
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement