The formula for ethane is C2H6. (the 2 and 6 are supposed to be subscripts) they show the number of atoms per element. So there are two carbon atoms and six hydrogen atoms in ethane. The subscript in a chemical formula represents the amount of that atom in that compound's formula. In chemistry, no subscript indicates 1 of that particular atom. HCl contains 1 atom of hydrogen and 1 atom of chlorine, whereas H20 contains 2 atoms of hydrogen and 1 atom of oxygen.It should be noted, however that this does not necessarily hold true for empiracle formulas, since these have been reduced to the simplest whole number ratio and do not necessarily reflect the number of each element present in an actual molecule.
I hope this helps you! Good luck :)