The formula you use is:
For water, the heat capacity is 4.184
We just plug in everything:
You may have seen problems where you have this same equation with different units. For example, you may have moles instead of mass, you may have
How do you work these out? Well, it all lies in the units of the heat capacity. For example, if you were working with moles and
Well, you'd eventually get
So if you get different units, it isn't the end of the world; just find a heat capacity that has matching units.
Hope that helps :)