
pres = pres * 6894.757;
temp = sat_p2t(pres);
}
else
{
printf(“\nEnter temperature in deg F: “);
scanf(“%lf”, &temp);
temp=((temp-32)/1.8)+273.15;
}
hl = enthalpy_l(temp);
hl = hl/(1055.056*2.2046226);
hv = enthalpy_v(temp);
hv =hv/(1055.056*2.2046226);
temp = ((temp-273.15)*1.8)+32;
printf(“\n”);
if(opt==’p’ || opt ==’P’)
printf(“Saturation temperature is %lf deg F\
n”,temp);
printf(“Enthalpy (liquid) is %lf Btu/lb\n”,hl);
printf(“Enthalpy (vapor) is %lf Btu/lb\n”,hv);
printf(“\nTry again? (Y/N)\n”);
res=getch();
}while(res == ‘y’ || res == ‘Y’);
return 0;
}
FIGURE 4.8: Output of Program Listing 4.3.
Applications Using ...