Summary
You need to know the definition of molarity :
The molarity of any component is the number of moles of that component in 1000 cm3 of the total system.
and the equation resulting from this definition:
Molarity = Number of Moles
Volume of Total System (in dm3 )
Volume of Total System (in dm3 )