# 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?

Sep 29, 2015

$12$ dimes (and $19$ quarters)

#### Explanation:

Define
$\textcolor{w h i t e}{\text{XXX}} d =$ number of dimes
$\textcolor{w h i t e}{\text{XXX}} q =$ number of quarters

We are told:
[1]$\textcolor{w h i t e}{\text{XXX}} d + q = 31$
[2]$\textcolor{w h i t e}{\text{XXX}} 10 d + 25 q = 595$

Multiply [1] by $10$
[3]$\textcolor{w h i t e}{\text{XXX}} 10 d + 10 q = 310$

Subtract [3] from [2]
[4]$\textcolor{w h i t e}{\text{XXX}} 15 q = 285$

Divide [4] by $15$
[5]$\textcolor{w h i t e}{\text{XXX}} q = 19$

Substitute $19$ from [5] for $q$ in [1]
[6]$\textcolor{w h i t e}{\text{XXX}} d + 19 = 31$

Subtract $19$ from both sides of [6]
[7]$\textcolor{w h i t e}{\text{XXX}} d = 12$