Skip to content

Provide the amount and it will give you the required change for it.

Notifications You must be signed in to change notification settings

ketandoshi/currency-change

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Change Coding Challenge Solution

Requirements

  • Ruby = 2.2

Setup

  • Goto project's folder in your terminal
  • Run bundle install
  • Run ruby bin/make_change.rb
  • It will display message: Default coins are:: Quarter => 25, Dime => 10, Nickel => 5, Penny => 1. Do you want to provide different coins (Y/N)?
  • If you want to proceed with default currency, enter n/N
  • If you want to provide different currency, enter y/Y and it will display: Provide space separated currencies e.g.: (Quarter 25 Dime 10 Nickel 5 Penny 1)::
  • After that it will display: Enter amount (non-negative) to get change::
  • Enter the amount you want to get change for

Specs

If you want to run the specs please run rspec . in project's home directory.

About

Provide the amount and it will give you the required change for it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages