How to form a Pseudocode and Flowcharts for a Vending Machine
FLOWCHART:
PSEUDOCODE:
Item [] items = {new Item("Cola", 10), new Item("Lipton", 12), new Item("Fanta", 15)}
int [] quantities = {10, 15, 12}
print(items)
print("Select an item to buy 0 -" + items.length)
choice = readInt()
quantities[choice]--
print("You bought " +items[choice])
Comments
Leave a comment