Write a program that simulates a soft drink machine.The programshould use a stru
ID: 3618477 • Letter: W
Question
Write a program that simulates a soft drink machine.The programshould use a structure that stores the following data:Drink Name
Drink Cost
Number of Drinks in MAchine
The program should create an array of five structures. the elementsahould be initialized with the following data:
Drink Name
cost Number in Machine
Cola .75 20 Root Beer
.75
20
Lemon-Lime
.75
20
Grape Soda
.80
20
Cream Soda
.80
20
Each time the program runs, it should enter a loop thatperforms the following steps: A list of drinks is displayed on thescree. the user should be allowed to either quit the program orpick a drink. if the user selects a drink, he or she will nextenter the amount of money that is to be inserted into the drinkmachine. the program should dispaly the amount of change that wouldbe returned and substract one from page number of that drink leftin the machine. if the user selects a drink that has sold out, ameggage should be displayed. the loop then repeats. whne the userchoose to quit the program it should display the total amountof money the machine earned.
Drink Name
cost Number in Machine
Cola .75 20 Root Beer
.75
20
Lemon-Lime
.75
20
Grape Soda
.80
20
Cream Soda
.80
20