please help for this Logic
We are having a problem translating these scenario to codes:
<b>Total = 1600</b>
to get the total we need to add (900 + 400 + 200) to get the exact value.
other scenarios: Total: 1350, 750, etc...
In all scenarios.. the less number of items added and closest sum to the total should be chosen.
Thanks in advance!