Answer:
Step-by-step explanation:
We can use the Ideal Gas Law to calculate the density of the gas.
pV = nRT
n = m/M Substitute for n
pV = (m/M)RT Multiply both sides by M
pVM = mRT Divide both sides by V
pM = (m/V) RT
ρ = m/V Substitute for m/V
pM = ρRT Divide each side by RT

Data:
The gas is N₂ at STP (0 °C and 1 bar)
p = 1 bar
M = 28.01 g/mol
R = 0.083 14 bar·L·K⁻¹mol⁻¹
T = 0 °C = 273.15 K
ρ = (1 × 28.01)/(0.083 14 × 273.15) = 1.23 g/L

It appears that you are using the old definition of STP. Standard pressure has been defined as 1 bar since 1982.