Answer:
See explaination
Step-by-step explanation:
In the below answer "Z" is the output. please kindly check attachment for further details.
When z=1 , the vending machine gives snacks
z=0 , the vending machine doesn't give snacks.
And z becomes 1( high) only when the machine gets 20 cents or more than 20 cents. Since the machine doesn't give change, after giving snacks it will restart from initial state A (where no coins were put).