#include <iostream.h>
#include "stack.h"


void main()
{

	unsigned num_ops;
	int element, command;
	cout << "How many operations do you want? ";
	cin >> num_ops;
	cout << "\nInput an integer: ";
	cin >> element;
	Stack* l = new Stack(element);
	// cout << *l;
	for (int i = 1; i < num_ops; i++)
	{

		cout << "\nInput an integer (1 = push or 2 = Pop): ";
		cin >> command;
		switch (command)
		{
		case 1:
			cout << "\nInput an integer: ";
			cin >> element;
			l->push(element); 
			break;
		case 2:
			cout << "\nPopping " << l->pop() << endl;
			break;
		case 3:
			cout << "\n bad command";
		}
		cout << *l;
	}
	cout << endl << endl;
}

