summaryrefslogtreecommitdiff
path: root/3869/CH7/EX7.4/Ex7_4.sce
blob: 8f491652c2fac34c0d417db20f86668713034ee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clear
//
//
//

//Variable declaration
theta=9.5*%pi/180     //glancing angle(radian)
lamda=0.58     //wavelength of X-rays(angstrom)
n=1            //order
h=2
k=0
l=0

//Calculation
d=n*lamda/(2*sin(theta))                      
a=d*sqrt(h**2+k**2+l**2)    //lattice parameter(angstrom)

//Result
printf("\n lattice parameter is %0.3f  angstrom",a)
printf("\n answer given in the book varies due to rounding off errors")