Programming Assignment 20

 

 

The Hartwick food service wants a computer program to keep track of the number of people served by each of its three cafeteria lines each day of the week.  Specifically, they would like to know the following things.

 

1.         The total number of people served each day .

2.         The total number of people served by each line.

 

 

Input data

                                        Line

               1   2   3  

              ---  ---  ---

     Sun       384  469  245

     Mon       400  333  529

     Tues      296  312  417

     Wed       410  399  398

     Thurs     369  391  461

     Fri       412  423  418

     Sat       377  444  388

 

Write a program which reads the data into a two-dimensional array called served.  Print the numbers of people served each day by the three lines and the number of people served by each of the lines each week.  Your output should look like the following:

 

     HARTWICK COLLEGE FOOD SERVICE

 

     DAILY STATISTICS

     ----- ----------

     Sunday    XXXX

     Monday    XXXX

     Tuesday   XXXX

     etc.      etc.

     Saturday  XXXX

 

     WEEKLY STATISTICS

     ------ ----------

     Line 1    XXXX

     Line 2    XXXX

     Line 3    XXXX

 

     TOTAL SERVED  XXXXX