Supermarket Checkout

 

            Write a flowchart to design a program for supermarket checkout. The program should have following functions:

The price of each item is typed in on the keyboard.

After a price is entered, the number of items and the subtotal price so far are displayed.

Enter a negative number on the keyboard to indicate that all items have been checked out.

 

Variables needed in the program:

                        x:          price of a single item

                        n:          number of items   

                        sum:     total price

 

            Depending on which software to use, some software requires to declare all the variables used in the program. Declaration and initialization of variables are normally at the beginning of a program.

 

Here is the flowchart: