posted 10 years ago
I have the program bellow that grades students(based on a two dimensional array with the answers) and i need to make it display the students based on the grades/scores in ascending order . I did that in two ways (using a array and a two dimensional array) but i have a hunch it can be done much more simple then i did it (but still using array object and nothing else ) . Any input about how to solve the problem in a more easy way is appreciated !
My first solution creating an array with the grades for sorting :
My second solution using a two dimensional array :