Demo entry 6691665

cpp

   

Submitted by jile on Jan 12, 2018 at 14:39
Language: C++. Code size: 326 Bytes.

void sort(int *array,int size)
{
    int tmp  ;
    for(int i=0;i<size;i++)
    {
        for(int j=i+1;j<size;j++)
        {
            if(array[i] < array[j])
            {
                tmp = array[j] ;
                array[j] = array[i] ;
                array[i] = tmp ;
            }
        }
    }
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).