Well, in order to obtain the mass of the gas in grams, we have to find out the number of moles. Since the eqn is Moles = Mass(g)/ar or mr and if we reconfigure the eqn to Mass= moles × ar or mr. To find out moles, we have to derive it from the concentration of it since concentration= Mol/dm3 amd if we reconfigure the eqn to moles= concentration × dm3, we can obtain the numner of moles. After that, imput the number of moles into the eqn: mass= moles × ar or mr. Tada.
Oh yeah, you must know what is the gas in the tank. If not, it is impossible.
Ar means relative atomic mass
Mr means relative molecular mass.