im trying to make it so that when the program calculate, the price is in a fixed value of 2 decimal. yet when i add the line << fixed << after "@ 'price" each". the fixed is applied to the entire cout. so how do i make it so that the fixed is applied to calculating the price and not the amount of item purchase?
i.e.
2 pencils @ .90 each = $1.80
2 pens @ .65 each = $1.30
and not
2 pencils @ .90 each = $1.80
2.00 pens @ .90 each = $1.30