Question: Write a program that implements the behavior of a cash register. Your program will consist of an indefinite while loop that keeps asking the user
Write a program that implements the behavior of a cash register. Your program will consist of an indefinite while loop that keeps asking the user for the price of an item. After the user enters the price the program will add it to a running total. When the user simply presses the enter key, exit the while loop and print the number of items entered and total price. Here is a transcript showing how the program should work:
Cash register Enter the price of an item:23.99 Enter the price of an item:3.00 Enter the price of an item:1.43 Enter the price of an item: You entered 3 items totaling $28.42
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
