#include<iostream>

using namespace std;

class Stack {

public:

int stack[10];

int top = 0;

void push(int a);

void del();

};

void Stack::push(int a) {

stack[top] = a;

top++;

}

void Stack::del() {

top--;

}

int main() {

Stack s;

cout<< s.top<<endl;

s.push(10);

cout << s.stack[s.top]<<endl;

cout << s.top;

cout << endl;

s.push(100);

cout << s.stack[s.top]<<endl;

cout << s.top;

cout << endl;

s.del();

cout << s.stack[s.top]<<endl;

cout << s.top;

cout << endl;

s.del();

cout << s.stack[s.top]<<endl;

cout << s.top;

cout << endl;

s.push(50);

cout << s.stack[s.top] << endl;

cout << s.top;

cout << endl;

s.del();

cout << s.stack[s.top] << endl;

cout << s.top;

cout << endl;

s.del();

cout << s.stack[s.top] << endl;

cout << s.top;

cout << endl;

s.push(500);

cout << s.stack[s.top] << endl;

cout << s.top;

cout << endl;

return 0;

}




안돌아가요 진짜 도저히 왜안돌아가는지 모르겠는데 한번만 도와주십쇼 ㅠㅠ