M(KOH)=39+16+1=56 g/mol
W(K)=39/56*100%=69.64%
W(O)=16/56*100%=28.57%
W(H)=1/56*100%=1.79%
M(Ba(OH)2)=137 + 16*2+1*2=171 g/mol
W(Ba)= 137 / 171*100%=80.12%
W(O)=16*2 / 171*100%=18.71%
W(H)=1*2 / 171*100%=1.17%
M(NH4OH)=14+1*4+16+1=35 g/mol
W(N)=14/35*100% = 40%
W(H)=1*5/35*100%=14.29%
W(O)=16/35*100%=45.71 %