Question: Your program should contain the following variables: state - this will store the current state of the machine. Initial value: A cost -
Your program should contain the following variables:
state this will store the current state of the machine. Initial value: A
cost this is the cost of each item in the machine. Initial value:
money the total amount of money currently inserted into the machine. Initial value:
item the item selected by the user in state C and dispensed in state D is soda, is snack, is candy. Initial value:
invsoda this the number of sodas in the machine. Initial value:
invsnack this the number of snacks in the machine. Initial value:
invcandy this the number of candy bars in the machine. Initial value:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
