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

//Variable declaration
theta=30*%pi/180     //glancing angle(radian)
h=1
k=1
l=1
lamda=1.5418             //wavelength(angstrom)
n=1                      //order

//Calculation
d=n*lamda/(2*sin(theta))      //interplanar spacing(angstrom)
a=d*sqrt((h**2)+(k**2)+(l**2))     //interatomic spacing(angstrom)

//Result
printf("\n interatomic spacing is %0.2f  angstrom",a)