how do u calulate the percentage composition of NO2 and mgcl2

You don't. There is no NO2 in MgCl2 which should be obvious.

To calculate the percentage composition of a compound, we need to determine the mass of each individual element present in the compound.

For NO2:

1. Identify the molar mass of each element:
- Nitrogen (N) has a molar mass of 14.01 g/mol.
- Oxygen (O) has a molar mass of 16.00 g/mol.

2. Determine the total molar mass of NO2:
- NO2 is composed of 1 nitrogen atom and 2 oxygen atoms.
- Nitrogen: 1 atom * 14.01 g/mol = 14.01 g/mol
- Oxygen: 2 atoms * 16.00 g/mol = 32.00 g/mol
- Total molar mass of NO2 = 14.01 g/mol + 32.00 g/mol = 46.01 g/mol.

3. Calculate the percentage composition of each element:
- Nitrogen: (14.01 g/mol / 46.01 g/mol) * 100% = approximately 30.43%
- Oxygen: (32.00 g/mol / 46.01 g/mol) * 100% = approximately 69.57%

For MgCl2:

1. Identify the molar mass of each element:
- Magnesium (Mg) has a molar mass of 24.31 g/mol.
- Chlorine (Cl) has a molar mass of 35.45 g/mol.

2. Determine the total molar mass of MgCl2:
- MgCl2 is composed of 1 magnesium atom and 2 chlorine atoms.
- Magnesium: 1 atom * 24.31 g/mol = 24.31 g/mol
- Chlorine: 2 atoms * 35.45 g/mol = 70.90 g/mol
- Total molar mass of MgCl2 = 24.31 g/mol + 70.90 g/mol = 95.21 g/mol.

3. Calculate the percentage composition of each element:
- Magnesium: (24.31 g/mol / 95.21 g/mol) * 100% = approximately 25.53%
- Chlorine: (70.90 g/mol / 95.21 g/mol) * 100% = approximately 74.47%

As mentioned earlier, NO2 is a different compound than MgCl2, and there is no NO2 present in MgCl2.