Mr(MgCl2) = 24 + 35*2 = 94
Mr(CaSO4) = 40 + 32 + 16 *4 = 136
W(Mg) = Ar(Mg)*n / Mr(MgCl2) * 100% = 24 * 1 / 94 *100% = 25,5%
W(Cl) = Ar(Cl) * n / Mr(MgCl2) *100% = 35 * 2 / 94 *100% = 74,5%
W(Ca) = Ar(Ca) * n / Mr(CaSO4) *100% = 40 * 1 / 136 *100% = 29,4%
W(S) = Ar(S) * n / Mr(CaSO4) *100% = 32 * 1 / 136 *100% = 23,5%
W(O) = Ar(O) * n / Mr(CaSO4) * 100% = 16 *4 / 136 *100% = 47%