0
how to code this? ( I have tried it but it's not working, my head hurts)
1Imagine you are creating a vending machine program. 2 The program should accept money in denominations of Twenty Peso (Php20), Ten Peso (Php10), Five Peso (Php5), and One Peso (Php1). 3 The program should keep asking the user for money until they have no money to enter anymore. 4 The vending machine dispenses 3 drinks: soda (costs Php50), juice (Php20), and water (Php18). 5 Once money is deposited, the program should ask which drink the user wants based on their choice (e.g., 1 for soda, 2 for juice, 3 for water). 6 Check if the deposited amount is greater than, less than, or equal to the drink price. The program informs the user if the amt is not enough; the program should return the difference as change if it is too much.
2 ответов
+ 2
I already did it, thank you everyone
+ 1
Have you written any pseudocode?
The steps are there, you just need to write them down first and tick the off as you code each part.
https://www.sololearn.com/discuss/238489/?ref=app
https://www.sololearn.com/discuss/316587/?ref=app