Sunday, August 2, 2009

How doiwrite a C++ program that reads in a list of prices, program should output theaverageprice andtotalprice

How do I write a C++ program that reads in a list of prices, And the program should output the average price and total price. The price should be properly formatted with a $ and only 2 points past the decimal.

How doiwrite a C++ program that reads in a list of prices, program should output theaverageprice andtotalprice
Show us what you've done so far.





How did you do the input?


How did you store the data internally?


How did you do the calculations?


How did you do the output?





If you haven't even started, you need your own teacher, not us.
Reply:its easy


assign a array and take prices of diffrnt things


add them its total


count no of items


find average


for formatting use ctype.h header with setwidth and setprecision functions


No comments:

Post a Comment