32.7k views
4 votes
A drink costs 5 dollars. A pizza costs 7 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 2 drinks and 3 pizzas yields totalCost of 31.

User Chefgon
by
3.0k points

1 Answer

4 votes

Answer:

The total cost of 2 drinks and 3 pizzas is 31 dollars.

Step-by-step explanation:

Cost of a drink = 5 dollars

Cost of 2 drinks = 2 × 5 dollars = 10 dollars

Cost of a pizza = 7 dollars

Cost of 3 pizzas = 3 × 7 dollars = 21 dollars

Total cost of 2 drinks and 3 pizzas = 10 dollars + 21 dollars = 31 dollars

User Ecora
by
3.7k points