Two moles of an ideal gas at 300K were cooled at constant volume so that the pressure is reduced to half the initial value. Then as a result of heating at constant pressure