// main.C testing out the stack.

#include<iostream.h>
#include "stack.h"

int main(void)
{
  Stack s;
  char c;
  while(1) {
    cout << "type letter to push, number to pop: ";
    cin >> c;
    if (c >= 'A' && c <= 'z') s.push(c);
    else if (c >= '0' && c <= '9') {
      if(s.is_empty()) break;
      cout << s.pop() << endl;
    }
    else cout << "unknown command" << endl;
  }
  cout << "all done\n";
  return 0;
}


