I am still working on my mail order program. I have got the program to the point where it needs to output the amounts with a dollar sign. When I code '$' in I can not figure out where to put it so that I do not get an error with it. Here is the code that I am trying to output:
Code:
// ouput summary of results
cout << "\n\nTotals for each product sold are: "
<< "\nProduct 1: " << ( aCount * 2.98 ) // display dollar amount of product1
<< "\nProduct 2: " << ( bCount * 4.50 ) // display dollar amount of product2
<< "\nProduct 3: " << ( cCount * 9.98 ) // display dollar amount of product3
<< "\nProduct 4: " << ( dCount * 4.49 ) // display dollar amount of product4
<< "\nProduct 5: " << ( eCount * 6.87 ) // display dollar amount of product5
<< "\nQuantity of all products sold: " << ( quantitySold = aCount + bCount + cCount + dCount + eCount )
<< endl;
Also is it possible to output this, for example, product 1: 6 @ $2.98 = $17.88? If so would it be coded here in my output summary or up in the program?