The task in this
assignment is to process several months of the Oneonta Bakery's sales
records. The input data looks like the
following:
Cookies Candy (You
only have to put
80 70
the two columns of
90 90
numbers in the data
55 77
file. Do not include
60 60
the headings.)
75 66
98 88
Your program
should do the following:
1. Use
an EOF-controlled loop to read in the sales amounts from an input file. Be sure to count the number of months of data
that are read in and use that number in computing the averages.
2. Compute
the total sales of cookies and candy each month.
3. Compute
the average monthly sales for cookies.
4. Compute
the average monthly sales for candy.
5. Compute
the average of the total sales of bakery items each month.
6. Determine
the maximum cookies, candy, and total monthly sales.
7. Print
a statement that saying which is more popular at the bakery, cookies or candy.
7. Output
which looks like the following should go to an output file.
ONEONTA BAKERY
Month Cookies Candy Total Sales
1
XX XX XXX
2
XX XX XXX
etc.
etc.
etc. etc.
Average XX XX XXX
Maximum
XX XX XXX
Minimum XX
XX XXX
Cookies
are more popular
Make
sure your program works correctly.