// stackdr.cpp in StackType1/


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

using namespace std;

int main() {

  // read ints, store in stack, display in reverse order

  StackType s1;
  int num;

  cout << "Enter numbers, negative number to stop" << endl;
  do {
    cin >> num;
    if (num >= 0)
      s1.Push(num);
  } while (num >= 0);

  cout << endl << "The numbers in reverse order are:" << endl;

  while (!s1.IsEmpty()) {
    s1.Pop(num);
    cout << num << "  ";
  }
  cout << endl;

}
