Skip to content

lobna/vending-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

vending-machine

A task for training on ruby To run the code

ruby vending_machine.rb

It do the following:

  • load the available changes and products from the file data.rb
  • Ask for the item number and check if it's available
  • Ask for the price
  • Retun back the changes the priority to the heighest value (95 will be back as 50,20,20,5)
  • Return back the paid money if there is no available changes

About

A task for training on ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages