Used printf to format the receipt output.