A sample of gas expands from volume V₁ to V₂. The amount of work done by the gas is greatest when the expansion is
A.isobaric
B.isothermal
C.adiabatic
D.equal in all cases