Solve homework2-problem6: Formatting Numbers