Added decimal formatting

This is after the assignment was handed in, but chapter 6 has a task
is the same but with decimal formatting.