Program #4 (Due 10 April)
's' 'name' EMP-NO AMOUNT DISTRICT PRODUCT
Employee Sales
Emp No Name No. of Sales Total Sales
xxx last first xx $xxxx.xx
. . . . .
District Sales
District Total Sales +------------------------------+
x $xxxxx.xx |where each 'x' represents one |
. . |digit position and 'last' and |
|'first' refer to an employee's|
Product Sales |last name and first name, |
Type No. Total Sales |respectively. |
xx $xxxxx.xx +------------------------------+
. .
'G' 'JONES' 421 167.43 1 13
'M' 'MARILYN' 288 627.90 1 22
'M' 'FRED' 339 438.65 4 13
'M' 'RAY' 421 738.11 4 13
'G' 'JONES' 421 274.49 2 22
'G' 'MCGRAW' 288 830.18 1 13 Based on this data, your
'G' 'DARKWA' 197 566.89 1 26 program should produce
'M' 'KWESI' 197 1021.03 2 19 the following report. Any
'M' 'MARILYN' 288 412.29 4 13 character other than 'G'
'*' ' ' 0 0.00 0 0 or 'M' may be the sentinel.
Employee Sales
Emp No Name No. of Sales Total Sales
421 JONES RAY 3 $1180.03
288 MCGRAW MARILYN 3 $1870.37
339 FRED 1 $ 438.65
197 DARKWA KWESI 2 $1587.92
District Sales
District Total Sales Notes:
1 $ 2192.40 Some salespersons may not have
2 $ 1295.52 their whole names in the
3 $ .00 report. Some districts may
4 $ 1589.05 have NO sales for the week.
Only products with non-zero
Product Sales sales are shown in the report;
Type No. Total Sales and they are listed in
13 $ 2586.66 numerical order. Employees
19 $ 1021.03 are listed in the order in
22 $ 902.39 which they first occur.
26 $ 566.89