#include #include #include #include using namespace std; struct element { int liczba = 0; element *next = nullptr; }; bool czyPusty(element *stos) { bool wynik = stos == nullptr ? true : false; return wynik; } void dodajElement(element *&stos, int wartosc) { element *el = new element; el->liczba = wartosc; el->next = stos; stos = el; } void usunElement(element *&stos) { if (stos != nullptr) { element *temp = stos; stos = stos->next; delete temp; } else { cout << "Stos jesy juz pusty" << endl; } } int pobierzElement(element *stos) { if (stos != nullptr) { return stos->liczba; } else { cout << "Stos jest pusty" << endl; }; }