# Shehkar pulls 31 coins out of his pocket. each coin is either a dime or a quarter. if he has a total of 5.95, how many dimes does he have?

Jul 20, 2018

19 quarters, 12 dimes.

#### Explanation:

Let $d$ be the number of dimes and $q$ be the number of quarters.

We can set up a simple pair of equations from the question. We know that the total number of coins is 31, hence
$d + q = 31 \mathmr{and} d = 31 - q$

We also know how much they cost, so
$10 d + 25 q = 595$

We can plug the first equation into the second, replacing d with the formula we got:
$10 \left(31 - q\right) + 25 q = 595$
$310 - 10 q + 25 q = 595$
$15 q = 285 \implies q = 19$

Since there are 19 quarters, there must be $31 - 19 = 12$ dimes.

We can check this:

19 quarters add up to $4.75. 12 dimes add up to$1.20. Put em together and you get \$5.95.