Suppose an energy qh (for example, 20 kJ) is supplied to the engine and qc is lost from the engine (for example, qc =−15 kJ) and discarded into the cold reservoir. The work done by the engine is equal to qh +qc (for example, 20 kJ +(−15 kJ) =5 kJ). The efficiency is the work done divided by the energy supplied as heat from the hot source.