summaryrefslogtreecommitdiff
path: root/24/CH20/EX20.2/Example20_2.sce
blob: 9aa4e7105f014f31a09be471cacc67d1f3005a96 (plain)
1
2
3
4
5
6
7
8
9
10
11
//Given that
n = 1  //in mole
T = 310  //in K
Vi = 12  //in L
Vf = 19  //in L
R = .0821  //in atm.lit/(mol.K)

//Sample Probelm 20-2
printf("**Sample Problem 20-2**\n")
W = n*R*T*log(Vf/Vi)  //in atm.lit
printf("The work done by the gas is equal to %fJ", W*1.0125*10^5*10^-3)