#t86. 大志买书
大志买书
Dazhi Buys Books
Problem Description
Li Dazhi went to a bookstore and bought books. He knows the unit price of each book, and now he wants to sort the books by unit price from low to high. How should he do it?
Input Format
The first line contains a positive integer , the number of books .
The second line contains numbers representing the unit prices of the books, guaranteed to be given to two decimal places.
Output Format
Output the numbers in ascending order, kept to two decimal places.
Sample Input
3
4.10 2.80 19.99
Sample Output
2.80 4.10 19.99
Hint
- Use a sorting routine; the input prices are real numbers — read them with
doubleorfloat. - The output must keep two decimal places (use
<iomanip>'sfixedandsetprecision(2)). - Verify with the sample.