diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /539/CH14/EX14.2.a | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '539/CH14/EX14.2.a')
-rwxr-xr-x | 539/CH14/EX14.2.a/Example_14_2a.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/539/CH14/EX14.2.a/Example_14_2a.sce b/539/CH14/EX14.2.a/Example_14_2a.sce new file mode 100755 index 000000000..d214aea7a --- /dev/null +++ b/539/CH14/EX14.2.a/Example_14_2a.sce @@ -0,0 +1,24 @@ +//Computations of the Density
+
+clear;
+clc;
+
+printf("\tExample 14.2\n");
+
+printf("\n\tPart A");
+Ac=12.01; //in g/mol Molecular weight of Carbon
+Ah=1.008; //in g/mol molecular weight of hydrogen
+a=7.41*10^-8; //in cm
+b=4.94*10^-8; //in cm
+c=2.55*10^-8; //in cm
+Na=6.023*10^23;
+
+Vc=a*b*c;
+n=2;
+A=(2*Ac)+(4*Ah);
+
+density_c=n*A/(Vc*Na);
+
+printf("\nDensity is : %f g/cm^3\n",density_c);
+
+//End
\ No newline at end of file |