summaryrefslogtreecommitdiff
path: root/3768/CH2/EX2.1/Ex2_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3768/CH2/EX2.1/Ex2_1.sce')
-rw-r--r--3768/CH2/EX2.1/Ex2_1.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/3768/CH2/EX2.1/Ex2_1.sce b/3768/CH2/EX2.1/Ex2_1.sce
new file mode 100644
index 000000000..8d0fe3f33
--- /dev/null
+++ b/3768/CH2/EX2.1/Ex2_1.sce
@@ -0,0 +1,16 @@
+//Example number 2.1, Page number 31
+
+clc;clear;
+close;
+
+// Variable declaration
+N=6.02*10**26; // Avagadro Number
+n=8; // number of atoms
+a=5.6*10**-10; // lattice constant(m)
+M=72.59; // atomic weight(amu)
+
+// Calculation
+rho=n*M/(a**3*N); // density(kg/m**3)
+
+// Result
+printf( "density is %.3f kg/m^3",rho)