#include <stdio.h> 
#include <stdlib.h> 
 
int main()
{
    int length = 15;
    int array[] = { 11, 42, 33, 14, 55, 36, 123, 241, 73, 82, 218, 46, 153, 108, 52 };
    for (int startIndex = 0; startIndex < length - 1; ++startIndex)
    {
        int maxIndex = startIndex;
        
        for (int currentIndex = startIndex + 1; currentIndex < length; ++currentIndex)
        {
            if (array[currentIndex] > array[maxIndex])
                
                maxIndex = currentIndex;
        }
        
        int t = array[startIndex];
        array[startIndex]= array[maxIndex];
        array[maxIndex] = t;
    }
    
    for (int index = 0; index < length; ++index)
        printf("%i  ", array[index]);
        
 
    return 0;
}