function to sort the array
function sortt ( number ) { var n = number . length ; for ( i = 0 ; i < n ; ++ i ) { for ( j = i + 1 ; j < n ; ++ j ) { if ( number [ i ] > number [ j ] ) { a = number [ i ] ; number [ i ] = number [ j ] ; number [ j ] = a ; } } } }