Help with 2D array and sorting

Trying to write a code that creates a 5 x 5 2D array with random numbers from 0-9. Then sorts array columns from lowest to highest top to bottom adding the rows to output a total. Similar to this but with random numbers.