Density is equal to mass divided by the volume, and when it comes to gases, we have a few changes but it is basically the same thing. At STP we will use the molar mass of each molecule or atom, and the value that represents 1 mol at STP, which is 22.4L
In some places, you can see molar mass as M or as FW (formula weight)
D = M/22.4L, this is our main formula
D(NO2) = 46gmol/22.4L
D(NO2) = 2.05g/L
D(Ne) = 20.18gmol/22.4L
D(Ne) = 0.90g/L
D(C2H6) = 30.07gmol/22.4L
D(C2H6) = 1.34g/L
1 - Neon
2 - Ethane
3 - Nitrogen dioxide