Receipt program on p. 165:
A cashier enters data for each of the customer's purchases.
Each data group consists of an item name (one word), the price of the
item and the quantity of the item being purchases.
'xyz' is used as a sentinal value.
A TYPICAL RUN:
Enter item name or xyz to stop: rake
Enter price per item and quantity: 19.50 1
Enter item name or xyz to stop: shovel
Enter price per item and quantity: 14.50 2
Enter item name or xyz to stop: hoe
Enter price per item and quantity: 3.50 6
Enter item name or xyz to stop: xyz
CONTENTS OF THE FILE, output.txt:
1 rake $19.50
2 shovel $29.00
6 hoe $21.00
Total bill is $69.50