$nCO_2 + n H_2O + \text{Energy} \rightarrow C_nH_{2n}O_n + nO_2$
As noted here, the formulas of many carbohydrates can be written as carbon hydrates, $$C_n(H_2O)_n$$, hence their name. The carbohydrates are a major source of metabolic energy, both for plants and for animals that depend on plants for food. Aside from the sugars and starches that meet this vital nutritional role, carbohydrates also serve as a structural material (cellulose), a component of the energy transport compound ATP/ADP, recognition sites on cell surfaces, and one of three essential components of DNA and RNA.