Question: In C program Code Blocks Write a program to simulate a vending machine with the following characteristics: The machine sells sodas, and a soda is
In C program "Code Blocks"
Write a program to simulate a vending machine with the following characteristics: The machine sells sodas, and a soda is 15 cents. The machine does not provide change. The user is expected to provide either Dimes or Nickels. The machine can be in one of the following states: State 1: No coins State 2: 5 cents (N) State 3: 10 cents (D) State 4: Dispensing soda Your program should ask for a coin and show the current state of the machine. Also, you need to display the mome when a soda is being dispensed. You need to draw and implement the corresponding state machine. The user should input the coin as a number: 5 or 10 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
