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

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

const int MAX = 100;

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.
{
  // prompt user
  cout << "This program sorts up to " << MAX << " input integers.\n";
  prompt("Use end-of-file to terminate the input early.\n"
	 "\n"
	 "Begin input:\n");

  int vec[MAX];  // input data
  int numItems;  // number of items input

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

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

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

  return 0;
}
