summaryrefslogtreecommitdiff
path: root/1571/CH8/EX8.7/Chapter8_Example7.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1571/CH8/EX8.7/Chapter8_Example7.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1571/CH8/EX8.7/Chapter8_Example7.sce')
-rwxr-xr-x1571/CH8/EX8.7/Chapter8_Example7.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/1571/CH8/EX8.7/Chapter8_Example7.sce b/1571/CH8/EX8.7/Chapter8_Example7.sce
new file mode 100755
index 000000000..dc420e833
--- /dev/null
+++ b/1571/CH8/EX8.7/Chapter8_Example7.sce
@@ -0,0 +1,16 @@
+clc
+clear
+
+//INPUT
+y=1.4;//coefficent of exapnsion
+p1=1;//standard pressure in atm
+dv=50;//ratio of initial volume to final volume
+t1=273;//standard temperature in K
+
+//CALCULATIONS
+p2=p1*dv;//final pressure when slowly compressed in atm
+p3=p1*(dv)^(y);//final pressure when suddenly compressed in atm
+t2=t1*(dv)^(y-1);//rise in temperature when it is suddenly compressed in K
+
+//OUTPUT
+mprintf('the final pressure when it is compressed slowly is %3fatm \n the final pressure when it is compressed suddenly is %3.2fatm \n the rise in temperature when it is suddenly compressed is %3.0fK',p2,p3,t2)