summaryrefslogtreecommitdiff
path: root/1991/CH6/EX6.10/10.sce
blob: 7bc0e0070437537df154dd12d5f9530dc460db4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
clc
clear
//input
m=3*10^-2 //mass of water
r1=1*10^3//density of water
r2=0.5//density of steam
p=1.01*10^5//atmospheric pressure
//calculation
v1=m/r1//volume of water
v2=m/r2//volume of gas
w=(v2-v1)*p//external work done by gas
//output
printf("the work done is %3.0f J",w)