#include <iostream>
using namespace std;
 
int maxIndex(int *array, int size);
void swap(int &x, int &y);
void selectionSort(int *array, int size);
 
int main()
{
        // create array and initialize with values
        int size = 0;
        cout << "How many integers do you want to enter? ";
        cin >> size;
 
        int* array = new int[size];
 
        cout << "Enter a list of " << size << " integers: " <<endl;
        for (int i = 0; i < size; i++)
               cin >> array[i];
 
        // sort the array
        selectionSort(array, size);
 
        // display the sorted array
        for (int j = 0; j < size; j++)
               cout << array[j] << ' ';
        cout << endl;
 
        return 0;
}
 
int maxIndex(int *array, int size)
{
        int imax = 0;
        
        // fill in code to find index of max element
 
        return imax;
}
 
void swap(int &x, int &y)
{
        // fill in code to swap x and y
}
 
void selectionSort(int *a, int n)
{
        // fill in code to sort array a
}
 
 

syntax highlighted by Code2HTML, v. 0.9.1