The flowchart starts with a customer choosing a drink and inputting the code for the drink. The machine finds the price for the drink in its database. The customer inserts coins. The vending machine counts the coins. If the coins inserted by the customer equal the can value, the customer receives the can. If the inserted coins have a larger value than the can value, the customer receives the can and the change.

Vending Machine - Flowchart example

Vending Machine diagram code in Gleek

start:queue
get CanID:rectangleR
cans database:db
get price
inserted = 0
received coin:rectangleR
get coinValue
inserted = inserted + coinValue
inserted >= price:diamond
drop can
change:rectangleR
end:queue
start–>get CanID–>get price–>inserted = 0–>received coin–>get coinValue–>inserted = inserted + coinValue–>inserted >= price-yes->drop can–>change–>end
inserted >= price-no->inserted = 0
get CanID–>cans database
cans database–>get price

About Flowcharts

A flowchart, or flow chart, is a type of diagram that shows a step-by-step view of a process. Flowcharts document the tasks and decisions needed to achieve a specific goal. A basic flowchart is easy to make and understand. Businesses, engineers and software designers often use flowcharts to diagram their ideas.

Similar flowchart examples

Order processing flowchart

Coffee machine flowchart

A/B testing flowchart

Problem-Solving flowchart

Credit card payment process flowchart