Mass percentage is defined as the ratio of mass of the element to the total mass of the compound.
The formula of mass percentage is given by:
Mass percentage =
(1)
mass of nitrogen = 56.00 grams
Let x be the total mass of the compound.
Put the given values in formula (1):

x=

x= 151.92 g
total mass of the compound = 151.92 g
To calculate the mass of oxygen in grams, subtract the mass of nitrogen from the total mass of the compound.
Mass of oxygen = 151.92 g - 56 .00 g = 95.92 g
Thus, mass of oxygen in grams = 95.92 grams.