blob: 1dc27e7f22460d4cbdb616a89a4c8bf26b9befcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
clear
//
//
//
//Variable declaration
a=5.64 //lattice constant(angstrom)
h1=1
k1=0
l1=0
h2=1
k2=1
l2=0
h3=1
k3=1
l3=1
//Calculation
d100=a/sqrt(h1**2+k1**2+l1**2) //spacing between (100) plane
d110=a/sqrt(h2**2+k2**2+l2**2) //spacing between (110) plane
d111=a/sqrt(h3**2+k3**2+l3**2) //spacing between (111) plane
//Result
printf("\n spacing between (100) plane is %0.3f angstrom",d100)
printf("\n spacing between (110) plane is %0.2f angstrom",d110)
printf("\n spacing between (111) plane is %0.2f angstrom",d111)
|