Let's find the Molar mass of Carbon $=12$.
Molar mass of Hydrogen $=1$.
Molar mass of Oxygen $=16$.
Mass of $CH _{2} O =12+2(1)+16=30$.
Molecular weight of compound given is 180 .
So, the molecular weight is $\frac{180}{30}=6$.
$\Rightarrow$ Molecular formula of compound is $C _{6} H _{12} O _{6}$.