Challenge: Inequalities

Designer wants to know, given below parameters, how many times a player can refuel before they can no longer afford an upgrade.
Coin Pickup Count: 30
Pickup Worth: 5 coins
Refuel Cost: 10 coins
Upgrade Cost: 100 coins

Available Coins: 30 x 5 = 150

n = times refueled

150 - 10n >= 100
-10n >= -50
n <= -50/-10 = 5

3 Likes

Awesome job!

Privacy & Terms