John's piggy bank contains quarters, dimes, and nickels.  He has three more dimes than quarters and 6 fewer nickels than quarters.  If he has 63 coins, how many quarters does John have?
Let x represent the number of quarters John has.
Nickels: x-6.
Dimes: x+3.
Total:x+x-6+x+3=63
3x-3=63
3x=66
x=
<gadget id="calculator">22</gadget>
<output>22</output>
22 quarters.

<result>22</result>