CO : CO₂ ratio when given amounts of carbon and oxygen react with each other
You should have written:

$$\ce{C + O2 -&gt; CO2}$$ 

and 

$$\ce{C + \frac{1}{2}O2 -&gt; CO}$$  

Then you should have determined what fraction of the carbon reacts by by the first reaction and what fraction of the carbon reacts by the second reaction.