Arranging the Numbers in Ascending and Descending Order