
/* selectionMain.cc -- Read an integer array, print it, sort it 
 * using the selection sort method and print again.
 */

#include <iostream.h>
#include <iomanip.h>
#include "selection.h"

enum{NMAX=10};

void main(void) {
  int x[NMAX];
  int hmny;
  int who;
  int where;

  hmny = getIntArray(x, NMAX, 0);
  if (hmny==0)
     cout << "This is the empty array!\n";
  else{
     cout << "The array was: \n";
     printIntArray(x, hmny);
     selectionSort(x, hmny);
     cout << "The sorted array is: " << endl;
     printIntArray(x, hmny);
  }
}


