Question: Read the question carefully! This question considers a vending machine that sells four types of candy bars: chocolate, caramel, peanut butter, and nuggat. The vending
Read the question carefully! This question considers a vending machine that sells four types of candy bars: chocolate, caramel, peanut butter, and nuggat. The vending machine accepts only coins of 10 cents and 25 cents. The price of the candy bars are 65 cents, 75 cents, 90 cents, and 50 cents respectively. There is a button to dispense the candy bar and you need to enter enough money to cover the price of the snack bar that you would get. The second limitation of the system, at any point in the time, you cannot input more than 100 cents to the device. Your task is to find at any point when a customer is using this device, how many possible states that stores a different money amount will be needed. Hint: If you use only 25 cents, you can have 0 (no coin inserted), 25 cents, 50 cents, 75 cents, and 100 cents states
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
