formats the cost

formats the cost of each item with sprintf