The percentage composition of oxygen in water can be calculated by dividing the mass of oxygen by the mass of water. 1 mole of water (which weighs 18.0153 g) contains 15.9994 gm of oxygen, hence the percentage composition of oxygen is:
% composition of oxygen in water = mass of oxygen / mass of water x 100
= `(15.9994)/(18.0153) xx 100 = 88.8101 %`
Thus water contains 88.8101% (or can be rounded off to 88.8%) oxygen.
We can similarly calculate the % composition of hydrogen in water, which is:
% composition of hydrogen in water = `(2.01588)/(18.0153) xx 100 = 11.1898 %`
This can also be calculated as 100%- % composition of oxygen ( = 100 - 88.8101 = 11.1899%), since oxygen and hydrogen together constitute water and hence their respective % compositions must add to 100% .
Hope this helps.