//Section-14,Example-8,Page no.-PC.17 //To find Molecular formula of Hydrocarbon. clc; //(r(hydrocarbon)/r(CH_4))=(M(CH_4)/M(hydrocarbon)) M_CH4=16 r_hc=1 r_CH4=2 M_hc=(16/(1/2)^2) disp(M_hc,'Molecular weight of hydrocarbon(g/mol)') //The hydrocarbon formula may be (C_4H_10) which has a molecular weight of 58g/mol.