A collection of quarters and nickles is worth $3.40. There are 24 coins. How many of the coins are quarters?

n+q = 24

5n+25q = 340
Now solve for q