summaryrefslogtreecommitdiff
path: root/3869/CH6/EX6.9/Ex6_9.sce
blob: 272340f52820bda1b70330afd0d793ea0a6bc937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clear
//
//
//

//Variable declaration
r=0.1278*10**-9   //atomic radius(m)
n=4               //number of atoms per unit cell
M=63.5            //atomic weight(amu)
N=6.02*10**26     //avagadro number(kg/mol)

//Calculation
a=sqrt(8)*r   //lattice constant(m)
rho=n*M/(a**3*N)   //density(kg/m**3)    

//Result
printf("\n density is %0.2f  kg/m**3",rho)
printf("\n answer given in the book is wrong")