the code should be able to display name in either ascending or descending order.

display marking in either ascending or descending order