We will follow the following formula in order to calculate percentage composition of x element :
Percentage coposition of X = (Molar Mass of X) /(Molar Mass of whole molecule )* 100
1.Percentage composition of hydrogen in HI ( M.mass HI = 1 + 126. = 127g/mol)
% of H in HI = Molar Mass of H / Molar Mass of whole molecule *100
= (1.008g/mol /127.99g/mol ) *100
= 0.78 %
2. Percentage composition of hydrogen in NH3 ( M.mass NH3= 14+3 = 17 g/mol)
% of H in NH3 = M.mass of hydrogen / M.mass of NH3*100
= (1.008g/mol )/17.031g/mol *100
= 0.059*100
=5.9 %
3. Percentage composition of hydrogen in COOH
% of H in COOH = M.mass of hydrogen / M.mass of COOH *100
= 1.008g/mol /45g/mol *100
= 0.024*100
= 2.24 %