A cup of coffee cost $4 and a cup of tea cost $3.50. If ray has $40 and has bought 6 cups of coffee,

June 2024 ยท 1 minute read
A cup of coffee cost $4 and a cup of tea cost $3.50. If ray has $40 and has bought 6 cups of coffee, find the maximum cups of tea he can buy

Calculate total coffee spend:
Total coffee spend = Cost per Cup of Coffee * Cups of Coffee
Total coffee spend = 4 * 6
Total coffee spend = 24

Calculate remaining amount to be spent on tea:
Remaining tea money = Starting Money - Total Coffee spend
Remaining tea money = 40 - 24
Remaining tea money = 16

Calculate cups of tea Ray can buy:
Cups of tea Ray can buy = Remaining Tea money / Cost per cup of tea
Cups of tea Ray can buy = 16/3.50
Cups of tea Ray can buy = 4.57142857143

Since Ray can't buy partial cups, we round down and we get:
Cups of tea Ray can buy = 4

ncG1vJloZrCvp2O6osDHnJylnZKntrXFjZympmeTpLquwc2iq7JnpJ2%2Fpq3DrGaaZZOqvW67xWaaqJ6WmrJur86sq2ZsXZa7pXnAZpquqF2ks27AxJpknKejqXp0eZRpZKKeXaeuunnHmqpmbGBirq%2BwjKGYrGWSpMKotNNmbWabpaXAbrvFZpqonpaasm9%2FmHFvaA%3D%3D