Skip to content

KotlinKenya/TheShopkeeperChangeChallenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

The Shopkeeper Change Challenge

The Shopkeeper Change Challenge

Implement a program that helps a shopkeeper to give change.

The currency denominations: 1000 Note 500 Note 100 Note 50 Note 20 coin 10 coin 5 coin 1 coin

Level 1.

The program has this input:

  • The amount due as change, that is entered by the shopkeeper.

The OutPut:

  • the amount to be issued to the customer in terms currency in denominations in terms of Notes and coins that the customer should receive.

Example: IF the customer gives the shopkeeper 352

The program should output: 3 100 Note 1 50 note 2 1 coin

Level 2.

⋅⋅⋅Imagine a shopping scenario. Integrate:

⋅⋅⋅1. A person is able to see what is available in the supermarket with various prices and details:

    * Milk 44,
    * Honey 162,
    * Eggs 357,
    * Bread 41,
    * Spinach 42,
    * Towel 236,
    * Soda 65,
  1. The customer should be able to shop for the items and get a bill at the end.

  2. The customer should be prompted to pay and an amount collected by the shopkeeper from the customer.

  3. Then the customer should be able to get the correct change in the various notes and coins and that indicated.

  4. The program tells the shopkeeper what values they should be able to give.

:Notes

  1. Should run on a terminal. This is a core language question.
  2. Solve in order and submit two results for level 1 and level 2
  3. Use coding best practices: important: Comment you code//
  4. You can fork the repo and submit a PR

About

The Shopkeeper Change Challenge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published