// selsort.C
// Name:  Gary T. Leavens
// TA:    Bjarne Stroustrup
// Section:  A1

#include <iostream.h>
#include "IOVec.h"
#include "bubsort2.h"
#include "prompt.h"

const int MAX = 100;   // maximum problem size handled

int main()
  // MODIFIES:  cin, cout
  // POST: cout has a prompt written to it,
  // and cin has up to MAX integers read from it (up to EOF, or the MAXth)
  // and cout has the integers written to it in ascending order.
{
  cout << "This program sorts up to " << MAX << " input integers.\n";

  // prompt for input
   prompt("Use end-of-file to terminate the input early.\n"
	  "\n"
	  "Begin input:\n");
 
  int vec[MAX];
  int numItems;

  // input the data
  InputVec(vec, numItems, MAX);

  // sort the data
  Sort(vec, numItems);

  // output the data
  OutputVec(vec, numItems);

  return 0;
}
