Balance the following equations:

a. C + O2 CO
b. CO + O2 CO2
c. H2 + Br2 HBr
d. K + H2O KOH + H2
e. Mg + O2 MgO

please explain and show work.