Facebook
From Capacious Sloth, 7 Years ago, written in Plain Text.
This paste is a reply to Untitled from Tinct Bat - go back
Embed
Viewing differences between Untitled and Re: Untitled
#include 
#include 

using namespace std;

int dane[100];
int rozmiar;

void wyswietl_stos()
{
    for (int i=rozmiar; i>=1; i--)
    {
        cout<     }

    if (rozmiar==0) cout<<" "< }

void push()
{
    if (rozmiar<100)
    {
         rozmiar=rozmiar+1;
         cin>>dane[rozmiar];
    }
}


void pop()
{
    if (rozmiar>=1)
    {
        rozmiar=rozmiar-1;
    }
    else
    {
        cout << "error";
    }
}

void empty()
{

    if (rozmiar==0) cout< }

int main()
{

    char wybor;
    rozmiar=0;

    do
    {
        wyswietl_stos();
        cin >> wybor;

        switch (wybor)
        {
        case 'push\0':
            push();
            break;

        case 'pop\0':
            pop();
            break;
        }

    }
    while (wybor != 'end\0');


    return 0;
}