blob: 8d0fe3f3357e133ca2f6c7c47364add90be29b3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
|