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

//Variable declaration
n=1     //order
theta=32*%pi/180     //glancing angle(radian)
lamda=1.54               //wavelength(angstrom)
h=2
k=2
l=0

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

//Result
printf("\n cube edge of unit cell is %0.1f  angstrom",a)