An ideal gas is heated during state change pressure varies linearly with respect to temperature, as shown in figure then work done by gas