If all were basketballs,  $$12\times $$＄$$30=$$＄$$360$$  the total cost would be ＄$$360$$.  ＄$$360-$$＄$$340=$$＄$$20$$  There is a difference of ＄$$20$$.  ＄$$30-$$＄$$25=$$＄$$5$$  ＄$$20\div $$＄$$5=4$$  $$12-4=8$$  The school bought $$8$$ basketballs. 
A school bought $$12$$ volleyballs and basketballs in total for ＄$$340$$. Each basketball costs ＄$$30$$. Each volleyball costs ＄$$25$$.  How many basketballs did the school buy? 
Options:
(1) $$4$$ 
(2) $$5$$ 
(3) $$6$$ 
(4) $$7$$ 
(5) $$8$$ 