Can anyone please help me with my project that involves on making a program about a vending machine?
Show older comments
my project is to make a program on how a vending machine works. I'm having troubles with it because I'm still new at matlab.
Suppose that the vending machine has drinks to be sell, for coke and sprite the prices are €20 and €25..the coins that could possibly be inserted in the vending machine are €5,€10,€25,€50, and ₱1..how can i make a program that records the coins inserted and gives the change if the coin inserted is greater than the price of the drink?
it would be a great help if anyone can help me with this project. Thanks a lot :)
Answers (2)
Walter Roberson
on 30 Aug 2011
0 votes
Wow, €25 for a soda pop?!? Is this vending machine in the middle of the desert ?
And where do you get the €50 coins, or any of the other coins you mention? The largest euro coin made is the €2
What is a ₱1 ? Google doesn't seem to index it at all?
I find it difficult to plan out how to give change for non-existent currency: with it being purely imaginary, I cannot assume that a €10 coin has any particular value relationship to a €5 coin. Could be based in Riemann Geometry for all we know.
kevz cavz
on 30 Aug 2011
0 votes
1 Comment
Walter Roberson
on 30 Aug 2011
What is your present code, and what error message do you get (and on which line) ?
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!