Mr(K2CO3) = Mr = 3Ar(O) + Ar(C) + 2Ar(K) = 3 * 16 + 1 * 12 + 2 * 39 = 138
w(O) = 3Ar(O) / Mr = 48 / 138 = 0.3478 = 34.78%
w(C) = Ar(C) / Mr = 12 / 138 = 0.087 = 8.70%
w(K) = 2Ar(K) / Mr = 78 / 138 = 0.5652 = 56.52%
Mr(NH4NO3) = Mr = 3Ar(O) + 2Ar(N) + 4Ar(H) = 3 * 16 + 2 * 14 + 4 * 1 = 80
w(O) = 3Ar(O) / Mr = 48 / 80 = 0.6 = 60%
w(N) = 2Ar(N) / Mr = 28 / 80 = 0.35 = 35%
w(H) = 4Ar(H) / Mr = 4 / 80 = 0.05 = 5%