// File: ismain.C
//
// Testing the IntStack class

#include <iostream.h>
#include <iomanip.h>
#include <stdlib.h>
#include "intstack.h"


main() {
   IntStack L ;
   int n, length ;

   L.push(5) ;
   L.push(5) ;
   L.push(2) ;
   L.push(7) ;
   L.push(5) ;
   L.push(5) ;
   L.push(13) ;
   L.push(12) ;
   L.push(11) ;
   L.print() ;
   cout << endl ;
   length = L.length() ;
   cout << "length = " << length << endl ;
   cout << endl ;

   n = L.pop() ;
   cout << "Removed item: " << n << endl ;
   L.print() ;
   cout << "\n" << endl ;

   n =  L.top() ; 
   cout << "Top item: " << n << endl ;
   L.print() ;
   cout << "\n" << endl ;

   cout << "Remove: " << L.pop() << endl ;
   cout << "Remove: " << L.pop() << endl ;
   cout << "Remove: " << L.pop() << endl ;
   cout << "Remove: " << L.pop() << endl ;
   cout << "Remove: " << L.pop() << endl ;
   L.print() ;
   cout << endl ;
   cout << "Remove: " << L.pop() << endl ;
   L.print() ;
   cout << endl ;
   L.push(1) ;
   L.push(2) ;
   L.push(3) ;
   L.print() ;
   cout << "\n" << endl ;
}
