Re: 真没想到,佐大妈下台就和那男的吹了 (转载)# Joke - 肚皮舞运动
g*e
1 楼
You
scanning
frequent
shoppers
cards.
Your
cash
register
logs
all
transactions
to
a
pipe-‐delimited
("|")
flat
text
file
in
the
following
format:
customer_name|product_category|item_description|cost
An
Pedro|groceries|apple|1.42
Nitin|tobacco|cigarettes|15.00
Susie|groceries|cereal|5.50
Susie|groceries|milk|4.75
Susie|tobacco|cigarettes|15.00
Susie|fuel|gasoline|44.90
Pedro|fuel|propane|9.60
All
Write
a
script/program
(in
your
language
of
choice)
that
will
parse
the
log
and
generate
the
following
output:
1. A
report
of
the
total
revenue
from
each
customer
2. A
report
for
each
customer
showing
how
much
of
their
spending
went
to
each
category.
3. Show
the
sales
tax
component
for
each
of
the
reports.
scanning
frequent
shoppers
cards.
Your
cash
register
logs
all
transactions
to
a
pipe-‐delimited
("|")
flat
text
file
in
the
following
format:
customer_name|product_category|item_description|cost
An
Pedro|groceries|apple|1.42
Nitin|tobacco|cigarettes|15.00
Susie|groceries|cereal|5.50
Susie|groceries|milk|4.75
Susie|tobacco|cigarettes|15.00
Susie|fuel|gasoline|44.90
Pedro|fuel|propane|9.60
All
Write
a
script/program
(in
your
language
of
choice)
that
will
parse
the
log
and
generate
the
following
output:
1. A
report
of
the
total
revenue
from
each
customer
2. A
report
for
each
customer
showing
how
much
of
their
spending
went
to
each
category.
3. Show
the
sales
tax
component
for
each
of
the
reports.