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
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
⋅⋅⋅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,
-
The customer should be able to shop for the items and get a bill at the end.
-
The customer should be prompted to pay and an amount collected by the shopkeeper from the customer.
-
Then the customer should be able to get the correct change in the various notes and coins and that indicated.
-
The program tells the shopkeeper what values they should be able to give.
- Should run on a terminal. This is a core language question.
- Solve in order and submit two results for level 1 and level 2
- Use coding best practices: important: Comment you code//
- You can fork the repo and submit a PR