Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////// matrix.h ///////////////////////////////////////////////////////////////
- #ifndef matrix_h
- #define matrix_h
- #include <cmath>
- #include "identity_matrix.h"
- enum LU_decision {BOTTOM,TOP}; // decydujemy czy interesuja nas gorna macierz trojkatna czy dolna
- class Matrix {
- unsigned int columns; // liczba kolumn
- unsigned int rows; // liczba wierszy
- double **mx; // macierz dynamiczna
- public:
- Matrix(unsigned int,unsigned int); // konstruktor dla prostokatnych
- Matrix(unsigned int); // konstruktor dla kwadratowych
- Matrix(const Matrix&); // konstruktor kopiujacy
- Matrix(const Id_Matrix&); // konstruktor kopiujacy dla macierzy jednostkowej
- ~Matrix(); // destruktor
- void load_data(); // do wczytywania danych do macierzy
- void show() const; // metoda stala do pokazywania macierzy
- void show(LU_decision) const; // do wyswietlania macierzy trojkatnych w rozkladzie LU
- Matrix multiply(const Matrix&, const Matrix&); // mnozenie dla potegowania (2 rozne czynniki)
- Matrix multiply(const Matrix&); // mnozenie dla potegowania (1 czynnik)
- Matrix exponentation(unsigned int); // potegowanie macierzy kwadratowych (tylko dla wykladnikow nieujemnych)
- bool lu(); // rozklad LU macierzy kwadratowej
- Matrix tranpose(); // do transponowania
- friend Matrix operator+(const Matrix&, const Matrix&); // dodawanie macierzy
- friend Matrix operator-(const Matrix&, const Matrix&); // odejmowanie macierzy
- friend Matrix operator*(const Matrix&, const Matrix&); // mnozenie macierzy
- friend Matrix operator*(const int, const Matrix&); // mnozenie przez skalar
- Matrix& operator=(const Matrix &mx1) { // operator przypisywania dla macierzy (dla potegowania)
- if(this!=&mx1) { // uwazamy na przypisanie &mx1=&mx1
- for(unsigned int i=0;i<this->rows;i++) {
- for(unsigned int j=0;j<this->columns;j++) {
- this->mx[i][j]=mx1.mx[i][j];
- }
- }
- }
- return *this;
- };
- };
- #endif
- ////////////////////////////////////////////////////////// matrix.cpp ///////////////////////////////////////////////////////////
- #include "matrix.h"
- #define EPSILON 1e-18 // do wyznaczania rozkladu LU --> otoczenie zera
- using namespace std;
- Matrix::Matrix(unsigned int _rows, unsigned int _columns) { // konstruktor dla prostokatnych macierzy
- cout << "Macierz created" << endl;
- rows = _rows;
- columns = _columns;
- mx = new double *[rows]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<rows;i++) {
- mx[i] = new double [columns]; // teraz tworzymy rows tablic o rozmiarze columns (tablice wierszy)
- }
- }
- Matrix::Matrix(unsigned int _order) { // konstruktor dla kwadratowych
- cout << "Macierz created" << endl;
- rows = _order;
- columns = _order;
- mx = new double *[rows]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<rows;i++) {
- mx[i] = new double [columns]; // teraz tworzymy rows tablic o rozmiarze columns (tablice wierszy)
- }
- }
- Matrix::Matrix(const Matrix &mx1) { // konstruktor kopiujacy
- cout << "Macierz created" << endl;
- rows = mx1.rows;
- columns = mx1.columns;
- mx = new double *[rows]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<rows;i++) {
- mx[i] = new double [columns];
- }
- for(unsigned int i=0;i<rows;i++) {
- for(unsigned int j=0;j<columns;j++) {
- mx[i][j]=mx1.mx[i][j];
- }
- }
- }
- Matrix::Matrix(const Id_Matrix &id_mx1) { // konstruktor kopiujacy dla macierzy jednostkowej(dla potegowania)
- cout << "Macierz created" << endl;
- rows = id_mx1.order;
- columns = id_mx1.order;
- mx = new double *[rows]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<rows;i++) {
- mx[i] = new double [columns];
- }
- for(unsigned int i=0;i<rows;i++) {
- for(unsigned int j=0;j<columns;j++) {
- mx[i][j]=id_mx1.mx[i][j];
- }
- }
- }
- Matrix::~Matrix() { // destruktor
- for(unsigned int i=0;i<rows;i++) {
- delete [] mx[i]; // niszczymy tablice wierszy
- }
- delete [] mx; // niszczymy tablice wskaznikow wierszy
- cout << "Macierz zostala zniszczona" << endl;
- }
- Matrix operator+(const Matrix &mx1, const Matrix &mx2) {
- if((mx1.columns==mx2.columns)&&(mx1.rows==mx2.rows)) {
- Matrix mx3 = Matrix(mx1.rows,mx1.columns);
- for(unsigned int i=0;i<mx1.rows;i++) {
- for(unsigned int j=0;j<mx1.columns;j++) {
- mx3.mx[i][j]=mx1.mx[i][j]+mx2.mx[i][j];
- }
- }
- cout << "Wynik:" << endl;
- mx3.show();
- return mx3;
- }
- else {
- Matrix mx3 = Matrix(0,0);
- cout << "Rozmiary macierzy nie sa takie same. Dodawanie jest niemozliwe." << endl;
- return mx3;
- }
- }
- Matrix operator-(const Matrix &mx1, const Matrix &mx2) {
- if((mx1.columns==mx2.columns)&&(mx1.rows==mx2.rows)) {
- Matrix mx3 = Matrix(mx1); // uzywam konstruktora kopiujacego
- for(unsigned int i=0;i<mx1.rows;i++) {
- for(unsigned int j=0;j<mx1.columns;j++) {
- mx3.mx[i][j]-=mx2.mx[i][j];
- }
- }
- cout << "Wynik:" << endl;
- mx3.show();
- return mx3;
- }
- else {
- Matrix mx3 = Matrix(0,0);
- cout << "Rozmiary macierzy nie sa takie same. Odejmowanie jest niemozliwe." << endl;
- return mx3;
- }
- }
- Matrix operator*(const Matrix &mx1, const Matrix &mx2) {
- double s; // suma kolejnych mnozen
- if(mx1.columns==mx2.rows) {
- Matrix mx3 = Matrix(mx1.rows,mx2.columns);
- for(unsigned int i=0;i<mx1.rows;i++) {
- for(unsigned int j=0;j<mx2.columns;j++) {
- s = 0;
- for(unsigned int k=0;k<mx1.columns;k++) { // mx2.rows tez moze byc
- s += mx1.mx[i][k]*mx2.mx[k][j];
- }
- mx3.mx[i][j]=s;
- }
- }
- cout << "Wynik:" << endl;
- mx3.show();
- return mx3;
- }
- else {
- Matrix mx3 = Matrix(0,0);
- cout << "Liczba kolumn pierwszej macierzy nie jest równa liczbie wierszy drugiej. Mnozenie jest niemozliwe." << endl;
- return mx3;
- }
- }
- Matrix operator*(const int s, const Matrix &mx1) {
- Matrix mx2 = Matrix(mx1);
- for(unsigned int i=0;i<mx1.rows;i++) {
- for(unsigned int j=0;j<mx1.columns;j++) {
- mx2.mx[i][j]=mx1.mx[i][j]*s;
- }
- }
- cout << "Wynik:" << endl;
- mx2.show();
- return mx2;
- }
- void Matrix::load_data() {
- double val; // wartosc wpisywana przez uzytkownika
- for(unsigned int i=0;i<rows;i++) {
- for(unsigned int j=0;j<columns;j++) {
- cout << "Wpisz wartosc w polu: " << i+1 << " wiersz " << "i " << j+1 << " kolumna" << endl;
- cin >> val;
- if(cin.good()) {
- mx[i][j]=val;
- }
- else {
- cout << "Wpisales zla wartosc " << endl;
- j--; // wracamy do pola gdzie zostala wpisana zla dana
- cin.clear(); //czyscimy flagi bledu
- cin.ignore( 1000, '\n' ); // zamiast cin.sync bo moze nie chodzic na linuxie...ignoruje do 1000
- //znakow w strumieniu... jesli napotkamy \n to koniec procesu
- }
- }
- }
- }
- void Matrix::show() const {
- for(unsigned int i=0;i<rows;i++) {
- cout << "|";
- for(unsigned int j=0;j<columns;j++) {
- cout << mx[i][j] << " ";
- }
- cout << "|" << endl;
- }
- cout << endl;
- }
- void Matrix::show(LU_decision d) const {
- if(d==BOTTOM) {
- for(unsigned int i=0;i<rows;i++) {
- cout << "|";
- for(unsigned int j=0;j<columns;j++) {
- if(j<i) {
- cout << mx[i][j] << " ";
- }
- else if(j==i)
- cout << "1" << " ";
- else
- cout << "0" << " ";
- }
- cout << "|" << endl;
- }
- cout << endl;
- }
- else {
- for(unsigned int i=0;i<rows;i++) {
- cout << "|";
- for(unsigned int j=0;j<columns;j++) {
- if(j>=i) {
- cout << mx[i][j] << " ";
- }
- else
- cout << "0" << " ";
- }
- cout << "|" << endl;
- }
- cout << endl;
- }
- }
- Matrix Matrix::multiply(const Matrix &mx1, const Matrix &mx2) {
- double s;
- Matrix mx3 = Matrix(mx1.rows,mx2.columns);
- for(unsigned int i=0;i<mx1.rows;i++) {
- for(unsigned int j=0;j<mx2.columns;j++) {
- s = 0;
- for(unsigned int k=0;k<mx1.columns;k++) { // mx2.rows tez moze byc
- s += mx1.mx[i][k]*mx2.mx[k][j];
- }
- mx3.mx[i][j]=s;
- }
- }
- return mx3;
- }
- Matrix Matrix::multiply(const Matrix &mx1) {
- double s;
- Matrix mx2 = Matrix(mx1.rows,mx1.columns);
- for(unsigned int i=0;i<mx1.rows;i++) {
- for(unsigned int j=0;j<mx1.columns;j++) {
- s = 0;
- for(unsigned int k=0;k<mx1.columns;k++) { // mx2.rows tez moze byc
- s += mx1.mx[i][k]*mx1.mx[k][j];
- }
- mx2.mx[i][j]=s;
- }
- }
- return mx2;
- }
- Matrix Matrix::exponentation(unsigned int s) { // potegowanie
- Id_Matrix id_mx(rows); // ustawiamy macierz jednostkowa
- id_mx.load_data();
- Matrix mx1(*this);
- Matrix mx2(id_mx); // kopiujemy macierz jednostkowa (mnozenie jest tylko dla klasy matrix)
- while(s) {
- if(s&1) { // badamy czy najmlodszym bitem liczby s jest 1
- mx2 = multiply(mx1,mx2);
- }
- s = s >> 1; // przesuniecie bitowe w prawo o 1 pozycje
- if(!s) break;
- mx1 = multiply(mx1);
- }
- return mx2;
- }
- bool Matrix::lu() { // rozklad LU
- if(rows==columns) {
- for(unsigned int i=0;i<rows-1;i++) {
- if(fabs(mx[i][i])>EPSILON) { // nie dzielimy przez zero
- for(unsigned int j=i+1;j<rows;j++) { // normalizacja kolumny (odejmujemy od kazdego elementu pod dany element na przekatnej
- mx[j][i]=mx[j][i]/mx[i][i];
- }
- for(unsigned int j=i+1;j<rows;j++) { // modyfikacja podmacierzy
- for(unsigned int k=i+1;k<rows;k++) {
- mx[j][k] = mx[j][k]-(mx[j][i]*mx[i][k]);
- }
- }
- }
- else {
- cout << "Rozklad LU nie jest mozliwy." << endl;
- return false;
- }
- }
- return true;
- }
- else {
- cout << "Rozklad LU jest tylko dla macierzy kwadratowych." << endl;
- return false;
- }
- }
- Matrix Matrix::tranpose() {
- Matrix mx2(columns,rows);
- for(unsigned int i=0;i<rows;i++) {
- for(unsigned int j=0;j<columns;j++) {
- mx2.mx[j][i] = mx[i][j];
- }
- }
- return mx2;
- }
- //////////////////////////////////////////////////////////// identity_matrix.h //////////////////////////////////////////////////
- #ifndef identity_matrix_h
- #define identity_matrix_h
- #include <iostream>
- class Id_Matrix {
- public:
- unsigned int order; // stopien
- double **mx; // macierz dynamiczna
- Id_Matrix(unsigned int); // konstruktor
- Id_Matrix(const Id_Matrix&); // konstruktor kopiujacy
- ~Id_Matrix(); // destruktor
- void load_data(); // do wczytywania danych do macierzy
- void show() const; // metoda stala do pokazywania macierzy
- };
- #endif
- ///////////////////////////////////////////////////////////// identity_matrix.cpp //////////////////////////////////////////////
- #include "identity_matrix.h"
- using namespace std;
- Id_Matrix::Id_Matrix(unsigned int _order) { //konstruktor
- order = _order;
- mx = new double *[order]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<order;i++) {
- mx[i] = new double [order]; // teraz tworzymy rows tablic o rozmiarze columns (tablice wierszy)
- }
- }
- Id_Matrix::Id_Matrix(const Id_Matrix &mx1) { // konstruktor kopiujacy
- cout << "Macierz jednostkowa created" << endl;
- order = mx1.order;
- mx = new double *[order]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<order;i++) {
- mx[i] = new double [order];
- }
- for(unsigned int i=0;i<order;i++) {
- for(unsigned int j=0;j<order;j++) {
- mx[i][j]=mx1.mx[i][j];
- }
- }
- }
- Id_Matrix::~Id_Matrix() { // destruktor
- for(unsigned int i=0;i<order;i++) {
- delete [] mx[i]; // niszczymy tablice wierszy
- }
- delete [] mx; // niszczymy tablice wskaznikow wierszy
- cout << "Macierz jednostkowa zostala zniszczona" << endl;
- }
- void Id_Matrix::load_data() {
- for(unsigned int i=0;i<order;i++) {
- for(unsigned int j=0;j<order;j++) {
- if(i==j)
- mx[i][j]=1;
- else
- mx[i][j]=0;
- }
- }
- }
- void Id_Matrix::show() const {
- for(unsigned int i=0;i<order;i++) {
- cout << "|";
- for(unsigned int j=0;j<order;j++) {
- cout << mx[i][j] << " ";
- }
- cout << "|" << endl;
- }
- cout << endl;
- }
- /////////////////////////////////////////////////////// Diagonal_matrix. h ////////////////////////////////////////////////////
- #ifndef diagonal_matrix_h
- #define diagonal_matrix_h
- #include <iostream>
- class D_Matrix {
- unsigned int order; // stopien
- double **mx; // macierz dynamiczna
- public:
- D_Matrix(unsigned int); // konstruktor
- D_Matrix(const D_Matrix&); // konstruktor kopiujacy
- ~D_Matrix(); // destruktor
- void load_data(); // do wczytywania danych do macierzy
- void show() const; // metoda stala do pokazywania macierzy
- void determinant(); // wyznacznik dla macierzy diagonalnych
- };
- #endif
- ////////////////////////////////////////////////////// Diagonal_matrix.cpp ///////////////////////////////////////////////////
- #include "diagonal_matrix.h"
- using namespace std;
- D_Matrix::D_Matrix(unsigned int _order): order(_order) { //konstruktor ( z lista inicjalizacyjna)
- cout << "Macierz diagonalna created" << endl;
- mx = new double *[order]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<order;i++) {
- mx[i] = new double [order]; // teraz tworzymy rows tablic o rozmiarze columns (tablice wierszy)
- }
- }
- D_Matrix::D_Matrix(const D_Matrix &mx1): order(mx1.order) { // konstruktor kopiujacy
- cout << "Macierz diagonalna created" << endl;
- mx = new double *[order]; // tworzymy tablice wskaznikow wierszy
- for(unsigned int i=0;i<order;i++) {
- mx[i] = new double [order];
- }
- for(unsigned int i=0;i<order;i++) {
- for(unsigned int j=0;j<order;j++) {
- mx[i][j]=mx1.mx[i][j];
- }
- }
- }
- D_Matrix::~D_Matrix() { // destruktor
- for(unsigned int i=0;i<order;i++) {
- delete [] mx[i]; // niszczymy tablice wierszy
- }
- delete [] mx; // niszczymy tablice wskaznikow wierszy
- cout << "Macierz diagoonalna zostala zniszczona" << endl;
- }
- void D_Matrix::load_data() {
- double val;
- for(unsigned int i=0;i<order;i++) {
- for(unsigned int j=0;j<order;j++) {
- if(i==j) {
- cout << "Wpisz wartosc w polu: " << i+1 << " wiersz " << "i " << j+1 << " kolumna" << endl;
- cin >> val;
- if(cin.good()) {
- mx[i][j]=val;
- }
- else {
- cout << "Wpisales zla wartosc " << endl;
- j--; // wracamy do pola gdzie zostala wpisana zla dana
- cin.clear(); //czyscimy flagi bledu
- cin.ignore( 1000, '\n' ); // zamiast cin.sync bo moze nie chodzic na linuxie...ignoruje do 1000
- //znakow w strumieniu... jesli napotkamy \n to koniec procesu
- }
- }
- else
- mx[i][j]=0;
- }
- }
- }
- void D_Matrix::show() const {
- for(unsigned int i=0;i<order;i++) {
- cout << "|";
- for(unsigned int j=0;j<order;j++) {
- cout << mx[i][j] << " ";
- }
- cout << "|" << endl;
- }
- cout << endl;
- }
- void D_Matrix::determinant() {
- double d=1; // wyznacznik
- unsigned int i=0; // pomocniczy
- while(i<order) {
- d *= mx[i][i];
- i++;
- }
- cout << "Wyznacznik tej macierzy wynosi:" << d << endl;
- }
- ///////////////////////////////////////////////////// other.h /////////////////////////////////////////////////////////////////
- #ifndef other_h
- #define other_h
- #include "matrix.h"
- #include "diagonal_matrix.h"
- void menu();
- unsigned int load_unsigned_int(const char*); // do liczby wierszy, kolumn
- int load_int(const char*); // do skalara
- void interface();
- #endif
- //////////////////////////////////////////////////// other.cpp ///////////////////////////////////////////////////////////////
- #include "other.h"
- using namespace std;
- void menu() {
- cout << "Menu programu: " << endl;
- cout << "1. Dodawanie macierzy " << endl;
- cout << "2. Odejmowanie macierzy " << endl;
- cout << "3. Mnozenie macierzy " << endl;
- cout << "4. Mnozenie macierzy przez skalar " << endl;
- cout << "5. Potegowanie macierzy (tylko dla macierzy kwadaratowych)" << endl;
- cout << "6. Rozklad LU (tylko dla macierzy kwadratowych)" << endl;
- cout << "7. Transponowanie macierzy" << endl;
- cout << "8. Wyznacznik (na razie tylko dla diagonalnych)" << endl;
- cout << "9. Koniec programu" << endl;
- cout << "Co chcesz zrobic ? Wpisz odpowiednia cyfre" << endl;
- }
- void clean_cin () {
- cout << "Wpisales zla wartosc " << endl;
- cin.clear(); //czyscimy flagi bledu
- cin.ignore( 1000, '\n' ); // zamiast cin.sync bo moze nie chodzic na linuxie...ignoruje do 1000
- //znakow w strumieniu... jesli napotkamy \n to koniec procesu
- }
- unsigned int load_unsigned_int(const char *str) { // do wczytywania kolumn i wierszy macierzy
- unsigned int i;
- cout << str << endl;
- cin >> i;
- while(cin.fail() || (i==0)) {
- clean_cin();
- cout << str << endl;
- cin >> i;
- }
- return i;
- }
- int load_int(const char *str) { // do wczytywania skalara
- int i; // skalar
- cout << str << endl;
- cin >> i;
- while(cin.fail()) {
- clean_cin();
- cout << str << endl;
- cin >> i;
- }
- return i;
- }
- void interface() {
- int choice=-1;
- unsigned int _columns, _rows,_order;
- bool lu_bool; // czy rozklad LU mozliwy czy nie
- while(choice!=9) {
- switch(choice){
- case 1: {
- _rows = load_unsigned_int("Podaj liczbe wierszy");
- _columns = load_unsigned_int("Podal licze kolumn");
- Matrix mx1(_rows,_columns);
- mx1.load_data();
- _rows = load_unsigned_int("Podaj liczbe wierszy");
- _columns = load_unsigned_int("Podaj liczbe kolumn");
- Matrix mx2(_rows,_columns);
- mx2.load_data();
- cout << "Macierze, ktore dodajemy:" << endl;
- mx1.show();
- mx2.show();
- Matrix mx3 = (mx1)+(mx2);
- break;
- }
- case 2: {
- _rows = load_unsigned_int("Podaj liczbe wierszy");
- _columns = load_unsigned_int("Podaj liczbe kolumn");
- Matrix mx1(_rows,_columns);
- mx1.load_data();
- _rows = load_unsigned_int("Podaj liczbw wierszy");
- _columns = load_unsigned_int("Podaj liczbe kolumn");
- Matrix mx2(_rows,_columns);
- mx2.load_data();
- cout << "Macierze, ktore odejmujemy:" << endl;
- mx1.show();
- mx2.show();
- Matrix mx3 = (mx1)-(mx2);
- break;
- }
- case 3: {
- _rows = load_unsigned_int("Podaj liczbe wierszy");
- _columns = load_unsigned_int("Podaj liczbe kolumn");
- Matrix mx1(_rows,_columns);
- mx1.load_data();
- _rows = load_unsigned_int("Podaj liczbw wierszy");
- _columns = load_unsigned_int("Podaj liczbe kolumn");
- Matrix mx2(_rows,_columns);
- mx2.load_data();
- cout << "Macierze, ktore mnozymy:" << endl;
- mx1.show();
- mx2.show();
- Matrix mx3 = (mx1)*(mx2);
- break;
- }
- case 4: {
- _rows = load_unsigned_int("Podaj liczbe wierszy");
- _columns = load_unsigned_int("Podaj liczbe kolumn");
- Matrix mx1(_rows,_columns);
- mx1.load_data();
- const int s = load_int("Podaj wartosc skalara");
- cout << "Macierz, ktora mnozysz przez wybrany skalar:" << endl;
- mx1.show();
- cout << "Wartosc skalara: " << s << endl << endl;
- Matrix mx2 = (s)*(mx1);
- break;
- }
- case 5: {
- _order = load_unsigned_int("Podaj stopien macierzy");
- Matrix mx1(_order);
- mx1.load_data();
- int s = load_unsigned_int("Podaj wartosc wykladnika");
- cout << "Macierz, ktora potegujesz:" << endl;
- mx1.show();
- cout << "Wartosc wykladnika: " << s << endl;
- Matrix mx2 = mx1.exponentation(s);
- cout << "Wynikowa macierza:" << endl;
- mx2.show();
- break;
- }
- case 6: {
- _order = load_unsigned_int("Podaj stopien macierzy");
- Matrix mx1(_order);
- mx1.load_data();
- cout << "Macierz,ktora bedzie poddana rozkladowi:" << endl;
- mx1.show();
- lu_bool=mx1.lu();
- if(lu_bool==true) {
- cout << "Wynikowe macierze" << endl;
- mx1.show(BOTTOM);
- mx1.show(TOP);
- }
- break;
- }
- case 7: {
- _rows = load_unsigned_int("Podaj liczbe wierszy");
- _columns = load_unsigned_int("Podaj liczbe kolumn");
- Matrix mx1(_rows,_columns);
- mx1.load_data();
- cout << "Macierz, ktora transponujesz:" << endl;
- mx1.show();
- Matrix mx2 = mx1.tranpose();
- cout << "Macierz wynikowa:" << endl;
- mx2.show();
- break;
- }
- case 8: {
- _order = load_unsigned_int("Podaj stopien macierzy diagonalnej");
- D_Matrix mx1(_order);
- mx1.load_data();
- cout << "Macierz diagonalna, dla ktorej liczysz wyznacznik:" << endl;
- mx1.show();
- mx1.determinant();
- }
- }
- if ((choice > 9)||(choice==0))
- cout << "Podales zla liczbe" << endl;
- menu();
- cin >> choice;
- if(cin.fail()) {
- clean_cin();
- }
- }
- }
- ///////////////////////////////////////////////////////////// main.cpp ////////////////////////////////////////////////////////
- #include "other.h"
- using namespace std;
- int main() {
- cout << "Witam w kalkulatorze macierzy" << endl;
- interface();
- cout << "Dziekujemy za skorzystanie z naszego kalkulatora" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement