Energieumwandlung, exotherme und endotherme Reaktion