#include <stdio.h>
#include <stdlib.h>

int values[] = { 40, 10, 100, 90, 20, 25, 12, 13, 10, 40 };

int compare (const int *a, const int *b)
{
    return *a  - *b; 
}

int main ()
{
    int n;
    for (n=0; n<10; n++)
    {
        printf("%d ",values[n]);
    }
    printf("\n");
    qsort (values, 10, sizeof(int), compare);
    for (n=0; n<10; n++)
    {
        printf ("%d ",values[n]);
    }
    printf("\n");
    system("pause");
    return 0;
}