summaryrefslogtreecommitdiff
path: root/1472/CH2/EX2.1/2_1.sce
blob: 7d25cbdaaa7aeecdc13a587adb70bc440482938c (plain)
1
2
3
4
5
6
7
8
9
10
11
clc
//Initialization of variables
g=1.4
P=100 //psia
V1=3 //cu ft
Pf=20 //psia
//calculations
V2=V1*(P/Pf)^(1/g)
W=(Pf*V2-P*V1)*144/(1-g)
//results
printf("Net work done = %d ft",W)