Water of crystallisation calculations

1)   4.92 g of hydrated magnesium sulphate crystals (MgSO4.nH2O) gave 2.40 g of anhydrous magnesium sulphate on heating to constant mass.  Work out the formula mass of the hydrated magnesium sulphate and so the value of n.


2)   In an experiment to find the value of x in the compound MgBr2.xH2O, 7.30 g of the compound on heating to constant mass gave 4.60 g of the anhydrous salt MgBr2.  Find the value of x.