Have you ever been low on cash and couldn't go beyond a certain dollar limit when shopping? You sort of need a calculator in your head. It would be cool if a device was actually part of the cart and as you add an item into the cart it would increment your total counter. To solve this, we are going to write a program that keeps a tally of the amount that we have spent so far as we visit a store.
- Allow the shopper (user) to enter in the product name and the cost. This should be echoed and confirmed. Make sure to check for bad data.
- The user should be allowed to continue this until they want to checkout.
- Your program needs to keep a running total.
- Upon checkout, the grand total should be displayed.
- Display money using proper formatting. You will need to have the following before displaying dollars and cents: