/* Filename: heapsort.cpp Programmer: Br. David Carlson Date: October 4, 1997 Revised: June 19, 1999 Revised: July 17, 2000 to use modern headers. This program creates an array of 20 random integers, prints them, sorts them using heapsort, then prints the sorted list of numbers. */ #include "arrayutl.h" int main(void) { IntArrayType IntArray; FillArray(IntArray); cout << "Original data" << endl; Print(IntArray, Max); HeapSort(IntArray, Max); cout << endl << "Sorted data" << endl; Print(IntArray, Max); return 0; }