summaryrefslogtreecommitdiff
path: root/494/CH8/EX8.3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /494/CH8/EX8.3
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 '494/CH8/EX8.3')
-rwxr-xr-x494/CH8/EX8.3/8_3.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/494/CH8/EX8.3/8_3.sce b/494/CH8/EX8.3/8_3.sce
new file mode 100755
index 000000000..e914df910
--- /dev/null
+++ b/494/CH8/EX8.3/8_3.sce
@@ -0,0 +1,19 @@
+//All the quantities are expressed in SI units
+
+gam = 1.4; //ratio of specific heats
+
+//(a)
+M = 2; //Mach number
+
+//the ratio of kinetic energy to internal energy is given by
+ratio = gam*(gam-1)*M*M/2;
+
+printf("\n(a)\nThe ratio of kinetic energy to internal energy is:\n\n %1.2f\n",ratio)
+
+//similarly for (b)
+//(b)
+M = 20;
+
+ratio = gam*(gam-1)*M*M/2;
+
+printf("\n(b)\nThe ratio of kinetic energy to internal energy is:\n\n %3.0f\n",ratio) \ No newline at end of file