Asked by Elizabeth
You received a $100 gift certificate to a clothing store. The store sells t-shirts for $15 and dress shirts for $22. You want to spend no more than the amount of the gift certificate. You want to leave at most $10 of the gift certificate unspent. You need at least one dress shirt What are all of the possible combinations of t-shirts and dress shirts you can buy?
Answers
Answered by
Steve
If you spend $x, you want
90 <= x <= 100
so, if you buy m T-shirts and n dress shirts, you need
15m+22n = x
n >= 1
So, start checking:
with n=1, 15m+22 = x
n m x
1 5 22+15*1=97
2 3 44+15*3=89; 44+15*4=104 so 2 dress shirts will not work.
...
90 <= x <= 100
so, if you buy m T-shirts and n dress shirts, you need
15m+22n = x
n >= 1
So, start checking:
with n=1, 15m+22 = x
n m x
1 5 22+15*1=97
2 3 44+15*3=89; 44+15*4=104 so 2 dress shirts will not work.
...
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.