If the temperature is to remain constant, the change in internal energy of an ideal gas is zero. Thus q =-w = -100 J. 100 J of heat is transferred from the system to the bath.