//example 5.6 clear; clc; //Given: W=1728;//Isothermal and reversible work done[J/mol] T=298;//Isothermal temperature[K] //to find the change in molar entropy when the gas expands isothermally and reversibly S=W/T;//change in molar entropy for isothermal and reversible process printf("The change in molar entropy = %f J/mol/K", S );