Skip to content

Instantly share code, notes, and snippets.

@yashjaiswal
yashjaiswal / grocerycalculator.txt
Created January 5, 2021 07:58
Problem statement for ruby code
## Sale Discount for a store
At the grocery store items are sold by quantity. For example Milk costs $3.97. However sometimes there is a sale and then consumers can buy n items for the price of one.
This week the pricing table at the local grocery store looks like this
```
Item Unit price Sale price
--------------------------------------
Milk $3.97 2 for $5.00