Numerical solutions have been obtained for one‐dimensional fluid flow problems involving shock and rarefaction waves by fixing attention, for the first time, on the energy of the fluid and following the motion of constantenergy cells, each of which contains a time‐dependent quantity of mass. This is analogous to the usual method which consists of solving the Lagrangian hydrodynamic equations and following the motion of constant‐mass cells, each of which contains a time‐dependent amount of energy. The method has been applied to problems in which the total energy of the fluid is a constant. Solution by finite‐difference techniques leads to a stability criterion which can be less restrictive than that obtained from the Lagrangian equations and hence give shorter computational times.